Skip to content

Commit

Permalink
fix: anomaly with extra anyOf with not: {} option
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Oct 2, 2024
1 parent b323c05 commit 71ead7f
Show file tree
Hide file tree
Showing 18 changed files with 553 additions and 861 deletions.
76 changes: 19 additions & 57 deletions jsonschemas/publications/3d/3.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -768,7 +730,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -816,7 +778,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down
76 changes: 19 additions & 57 deletions jsonschemas/publications/article/3.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -727,7 +689,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -775,7 +737,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down
76 changes: 19 additions & 57 deletions jsonschemas/publications/audio/3.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand All @@ -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."
},
{
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -729,7 +691,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -777,7 +739,7 @@
"$ref": "#/$defs/EncryptableUri"
},
"attributes": {
"$ref": "#/$defs/MediaAttributes"
"$ref": "#/$defs/MediaAudio/properties/attributes"
},
"type": {
"type": "string",
Expand Down
Loading

0 comments on commit 71ead7f

Please sign in to comment.