diff --git a/jsonschemas/publications/3d/3.0.0.json b/jsonschemas/publications/3d/3.0.0.json index 21346f5..ef5762c 100644 --- a/jsonschemas/publications/3d/3.0.0.json +++ b/jsonschemas/publications/3d/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -638,18 +606,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -659,7 +620,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -768,7 +730,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -816,7 +778,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/article/3.0.0.json b/jsonschemas/publications/article/3.0.0.json index c22fe2a..b47970c 100644 --- a/jsonschemas/publications/article/3.0.0.json +++ b/jsonschemas/publications/article/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -597,18 +565,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -618,7 +579,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -727,7 +689,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -775,7 +737,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/audio/3.0.0.json b/jsonschemas/publications/audio/3.0.0.json index b3ddd5e..8388521 100644 --- a/jsonschemas/publications/audio/3.0.0.json +++ b/jsonschemas/publications/audio/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -599,18 +567,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -620,7 +581,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -729,7 +691,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -777,7 +739,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/checking-in/3.0.0.json b/jsonschemas/publications/checking-in/3.0.0.json index 7acadd3..b71af69 100644 --- a/jsonschemas/publications/checking-in/3.0.0.json +++ b/jsonschemas/publications/checking-in/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -620,18 +588,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -641,7 +602,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -750,7 +712,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -798,7 +760,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/embed/3.0.0.json b/jsonschemas/publications/embed/3.0.0.json index edca0d3..8a5b4c2 100644 --- a/jsonschemas/publications/embed/3.0.0.json +++ b/jsonschemas/publications/embed/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -595,18 +563,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -616,7 +577,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -725,7 +687,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -773,7 +735,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/event/3.0.0.json b/jsonschemas/publications/event/3.0.0.json index 67a42b2..4a925de 100644 --- a/jsonschemas/publications/event/3.0.0.json +++ b/jsonschemas/publications/event/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -1119,18 +1087,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -1140,7 +1101,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -1249,7 +1211,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -1297,7 +1259,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/image/3.0.0.json b/jsonschemas/publications/image/3.0.0.json index faf98e9..de128fe 100644 --- a/jsonschemas/publications/image/3.0.0.json +++ b/jsonschemas/publications/image/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -599,18 +567,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -620,7 +581,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -729,7 +691,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -777,7 +739,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/link/3.0.0.json b/jsonschemas/publications/link/3.0.0.json index 114f856..e955e83 100644 --- a/jsonschemas/publications/link/3.0.0.json +++ b/jsonschemas/publications/link/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -595,18 +563,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -616,7 +577,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -725,7 +687,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -773,7 +735,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/livestream/3.0.0.json b/jsonschemas/publications/livestream/3.0.0.json index 5887ff5..f46fe62 100644 --- a/jsonschemas/publications/livestream/3.0.0.json +++ b/jsonschemas/publications/livestream/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -636,18 +604,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -657,7 +618,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -766,7 +728,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -814,7 +776,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/mint/3.0.0.json b/jsonschemas/publications/mint/3.0.0.json index e98caf5..1e76fc5 100644 --- a/jsonschemas/publications/mint/3.0.0.json +++ b/jsonschemas/publications/mint/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -595,18 +563,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -616,7 +577,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -725,7 +687,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -773,7 +735,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/space/3.0.0.json b/jsonschemas/publications/space/3.0.0.json index f849b37..9fe7b44 100644 --- a/jsonschemas/publications/space/3.0.0.json +++ b/jsonschemas/publications/space/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -615,18 +583,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -636,7 +597,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -745,7 +707,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -793,7 +755,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/story/3.0.0.json b/jsonschemas/publications/story/3.0.0.json index e7d0b3e..3bf13bb 100644 --- a/jsonschemas/publications/story/3.0.0.json +++ b/jsonschemas/publications/story/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -587,18 +555,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -608,7 +569,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -717,7 +679,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -765,7 +727,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/text-only/3.0.0.json b/jsonschemas/publications/text-only/3.0.0.json index df0dbe3..e597656 100644 --- a/jsonschemas/publications/text-only/3.0.0.json +++ b/jsonschemas/publications/text-only/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -584,18 +552,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -605,7 +566,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -714,7 +676,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -762,7 +724,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/transaction/3.0.0.json b/jsonschemas/publications/transaction/3.0.0.json index bc87f18..9b1fc14 100644 --- a/jsonschemas/publications/transaction/3.0.0.json +++ b/jsonschemas/publications/transaction/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -619,18 +587,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -640,7 +601,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -749,7 +711,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -797,7 +759,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/jsonschemas/publications/video/3.0.0.json b/jsonschemas/publications/video/3.0.0.json index 84e212c..0595030 100644 --- a/jsonschemas/publications/video/3.0.0.json +++ b/jsonschemas/publications/video/3.0.0.json @@ -4,15 +4,7 @@ "description": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "description": "A human-readable description of the item. It could be plain text or markdown." - } - ], + "type": "string", "description": "A human-readable description of the item. It could be plain text or markdown." }, { @@ -24,17 +16,9 @@ "external_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site." }, { @@ -57,17 +41,9 @@ "image": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "Marketplaces will store any NFT image here." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "Marketplaces will store any NFT image here." }, { @@ -79,17 +55,9 @@ "animation_url": { "anyOf": [ { - "anyOf": [ - { - "not": {} - }, - { - "type": "string", - "minLength": 6, - "format": "uri", - "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." - } - ], + "type": "string", + "minLength": 6, + "format": "uri", "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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." }, { @@ -602,18 +570,11 @@ "additionalProperties": true }, "MediaAttributes": { - "anyOf": [ - { - "not": {} - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/MetadataAttribute" - }, - "minItems": 1 - } - ], + "type": "array", + "items": { + "$ref": "#/$defs/MetadataAttribute" + }, + "minItems": 1, "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "MediaAudio": { @@ -623,7 +584,8 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAttributes", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard." }, "type": { "type": "string", @@ -732,7 +694,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", @@ -780,7 +742,7 @@ "$ref": "#/$defs/EncryptableUri" }, "attributes": { - "$ref": "#/$defs/MediaAttributes" + "$ref": "#/$defs/MediaAudio/properties/attributes" }, "type": { "type": "string", diff --git a/src/__tests__/zodToJsonSchema.spec.ts b/src/__tests__/zodToJsonSchema.spec.ts new file mode 100644 index 0000000..a5380fa --- /dev/null +++ b/src/__tests__/zodToJsonSchema.spec.ts @@ -0,0 +1,263 @@ +import { describe, expect, it } from '@jest/globals'; +import { zodToJsonSchema } from 'zod-to-json-schema'; + +import { MarketplaceMetadataSchema } from '../marketplace'; +import { MediaAttributesSchema } from '../publication'; + +describe(`Given the zod-to-json-schema package`, () => { + describe('when converting MediaAttributesSchema', () => { + it('should avoid the odd extra `anyOf` with `not: {}` option', async () => { + const jsonSchema = zodToJsonSchema(MediaAttributesSchema, { + target: 'jsonSchema7', + definitionPath: '$defs', + }); + + expect(jsonSchema).toMatchInlineSnapshot(` + { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.", + "items": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "key": { + "description": "The attribute's unique identifier.", + "minLength": 1, + "type": "string", + }, + "type": { + "const": "Boolean", + "type": "string", + }, + "value": { + "description": "A JS boolean value serialized as string. It's consumer responsibility to parse it.", + "enum": [ + "true", + "false", + ], + "type": "string", + }, + }, + "required": [ + "type", + "key", + "value", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "key": { + "description": "The attribute's unique identifier.", + "minLength": 1, + "type": "string", + }, + "type": { + "const": "Date", + "type": "string", + }, + "value": { + "description": "A valid ISO 8601 date string. It's consumer responsibility to parse it.", + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "type", + "key", + "value", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "key": { + "description": "The attribute's unique identifier.", + "minLength": 1, + "type": "string", + }, + "type": { + "const": "Number", + "type": "string", + }, + "value": { + "description": "A valid JS number serialized as string. It's consumer responsibility to parse it.", + "minLength": 1, + "type": "string", + }, + }, + "required": [ + "type", + "key", + "value", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "key": { + "description": "The attribute's unique identifier.", + "minLength": 1, + "type": "string", + }, + "type": { + "const": "String", + "type": "string", + }, + "value": { + "description": "A string value.", + "minLength": 1, + "type": "string", + }, + }, + "required": [ + "type", + "key", + "value", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "key": { + "description": "The attribute's unique identifier.", + "minLength": 1, + "type": "string", + }, + "type": { + "const": "JSON", + "type": "string", + }, + "value": { + "description": "A JSON string. It's consumer responsibility to validate and parse it.", + "minLength": 1, + "type": "string", + }, + }, + "required": [ + "type", + "key", + "value", + ], + "type": "object", + }, + ], + }, + "minItems": 1, + "type": "array", + } + `); + }); + }); + + describe('when converting MarketplaceMetadataSchema', () => { + it('should avoid the odd extra `anyOf` with `not: {}` option', async () => { + const jsonSchema = zodToJsonSchema(MarketplaceMetadataSchema, { + target: 'jsonSchema7', + definitionPath: '$defs', + }); + + expect(jsonSchema).toMatchInlineSnapshot(` + { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": true, + "properties": { + "animation_url": { + "anyOf": [ + { + "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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", + "minLength": 6, + "type": "string", + }, + { + "type": "null", + }, + ], + "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA. 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.", + }, + "attributes": { + "description": "These are the attributes for the item, which will show up on the OpenSea and others NFT trading websites on the item.", + "items": { + "additionalProperties": true, + "properties": { + "display_type": { + "enum": [ + "number", + "string", + "date", + ], + "type": "string", + }, + "trait_type": { + "description": "The name of the trait.", + "minLength": 1, + "type": "string", + }, + "value": { + "type": [ + "string", + "number", + ], + }, + }, + "type": "object", + }, + "type": "array", + }, + "description": { + "anyOf": [ + { + "description": "A human-readable description of the item. It could be plain text or markdown.", + "type": "string", + }, + { + "type": "null", + }, + ], + "description": "A human-readable description of the item. It could be plain text or markdown.", + }, + "external_url": { + "anyOf": [ + { + "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.", + "format": "uri", + "minLength": 6, + "type": "string", + }, + { + "type": "null", + }, + ], + "description": "This is the URL that will appear below the asset's image on OpenSea and others etc. and will allow users to leave OpenSea and view the item on the site.", + }, + "image": { + "anyOf": [ + { + "description": "Marketplaces will store any NFT image here.", + "format": "uri", + "minLength": 6, + "type": "string", + }, + { + "type": "null", + }, + ], + "description": "Marketplaces will store any NFT image here.", + }, + "name": { + "description": "Name of the NFT item.", + "type": "string", + }, + }, + "type": "object", + } + `); + }); + }); +}); diff --git a/src/marketplace.ts b/src/marketplace.ts index e11c414..e99d724 100644 --- a/src/marketplace.ts +++ b/src/marketplace.ts @@ -88,16 +88,16 @@ export const MarketplaceMetadataSchema = z 'A human-readable description of the item. It could be plain text or markdown.', }), ) - .optional() .nullable() + .optional() .catch(null), external_url: uriSchema( `This is the URL that will appear below the asset's image on OpenSea and others etc. ` + 'and will allow users to leave OpenSea and view the item on the site.', ) - .optional() .nullable() + .optional() .catch(null), name: z.string({ description: 'Name of the NFT item.' }).optional(), @@ -110,8 +110,8 @@ export const MarketplaceMetadataSchema = z .catch([]), image: uriSchema('Marketplaces will store any NFT image here.') - .optional() .nullable() + .optional() .catch(null), animation_url: uriSchema( @@ -120,8 +120,8 @@ export const MarketplaceMetadataSchema = z '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.', ) - .optional() .nullable() + .optional() .catch(null), }) .passthrough(); // loose validation for any unknown fields; diff --git a/src/publication/common/media.ts b/src/publication/common/media.ts index b384083..7e86c59 100644 --- a/src/publication/common/media.ts +++ b/src/publication/common/media.ts @@ -11,14 +11,13 @@ import { export const MediaAttributesSchema = MetadataAttributeSchema.array() .min(1) - .optional() .describe( 'A bag of attributes that can be used to store any kind of metadata that is not currently supported by the standard.', ); const MediaCommonSchema = z.object({ item: EncryptableUriSchema, - attributes: MediaAttributesSchema, + attributes: MediaAttributesSchema.optional(), }); /**