From 445609af2f4e8917bcfd9c8e19b26f62801808ac Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 5 Mar 2023 19:30:40 +0000 Subject: [PATCH] Remove voucher subschema --- Makefile | 1 - bundle.py | 14 -------------- dist/voucher.json | 1 - voucher.in.json | 19 ------------------- 4 files changed, 35 deletions(-) delete mode 100644 dist/voucher.json delete mode 100644 voucher.in.json diff --git a/Makefile b/Makefile index 0193acb..c0ea30d 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,3 @@ build: test: build check-jsonschema --schemafile dist/cic.json test_valid.json - check-jsonschema --schemafile dist/voucher.json test_valid.json diff --git a/bundle.py b/bundle.py index fbb73cc..0e40693 100644 --- a/bundle.py +++ b/bundle.py @@ -41,17 +41,3 @@ fp = os.path.join('dist', 'cic.json') f = open(fp, 'w') json.dump(o, f) f.close() - -fp = os.path.join('.', 'voucher.in.json') -f = open(fp, 'r') -o_voucher = json.load(f) -for k in o_voucher['properties'].keys(): - p = {} - for v in o_voucher['properties'][k]: - p[v] = o_voucher['properties'][k][v] - o['properties'][k] = p - -fp = os.path.join('dist', 'voucher.json') -f = open(fp, 'w') -json.dump(o, f) -f.close() diff --git a/dist/voucher.json b/dist/voucher.json deleted file mode 100644 index 09644c5..0000000 --- a/dist/voucher.json +++ /dev/null @@ -1 +0,0 @@ -{"$schema": "https://json-schema.org/draft/2020-12/schema", "title": "CIC core metadata container", "$id": "/cic/core", "type": "object", "properties": {"version": {"type": "integer"}, "attachments": {"type": "array", "items": {"$ref": "/mime"}}, "certifications": {"type": "array", "items": {"type": "string", "format": "uri"}, "minItems": 1}, "image_data": {"type": "string", "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the image parameter.", "contentEncoding": "base64", "contentMediaType": "image/svg+xml"}, "image": {"type": "string", "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.", "format": "uri"}, "external_url": {"type": "string", "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", "format": "uri"}, "attributes": {"type": "array", "description": "These are the attributes for the item, which will show up on the OpenSea page for the item. (see below)", "items": {"type": "object", "properties": {"trait_type": {"type": "string"}, "value": {"oneOf": [{"type": "string"}, {"type": "number"}]}, "display_type": {"type": "string"}}, "required": ["trait_type", "value"]}}, "animation_url": {"type": "string", "description": "Animation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", "format": "uri"}, "name": {"type": "string", "description": "Identifies the asset to which this NFT represents"}, "description": {"type": "string", "description": "Describes the asset to which this NFT represents"}, "unitOfAccount": {"type": "string"}, "issuerName": {"type": "string"}, "namespace": {"type": "string"}}, "required": ["version", "attachments", "attributes"], "mime": {"$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "/mime", "title": "A single generic attachment for documenting any asset", "type": "object", "properties": {"contentType": {"type": "string", "$comment": "valid mime type"}, "contentTransferEncoding": {"type": "string", "enum": ["BASE64", "QUOTED-PRINTABLE", "8BIT", "7BIT"]}, "subject": {"type": "string", "$comment": "utf-8"}, "body": {"type": "string", "$comment": "uri including dataurl"}, "ref": {"type": "string", "format": "uri"}}, "required": ["contentType", "subject"], "oneOf": [{"required": ["body"]}, {"required": ["ref"]}]}, "oneOf": [{"required": ["image"]}, {"required": ["image_data"]}]} \ No newline at end of file diff --git a/voucher.in.json b/voucher.in.json deleted file mode 100644 index 380b882..0000000 --- a/voucher.in.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "/cic/voucher", - "title": "CIC voucher schema extensiom", - - "type": "object", - "properties": { - "unitOfAccount": { - "type": "string" - }, - "issuerName": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "require": ["unitOfAccount", "issuerName"] -}