-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for explicit use of 2020 metaschema
Relative dyanicRef usage was resolved incorrectly in the prior implementation, but it has been fixed by correct use of `referencing`. Test to ensure that this case is satisfied. See also: #293
- Loading branch information
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
tests/example-files/explicit-schema/positive/2020-meta/instance.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
80 changes: 80 additions & 0 deletions
80
tests/example-files/explicit-schema/positive/2020-meta/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/schema", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/core": true, | ||
"https://json-schema.org/draft/2020-12/vocab/applicator": true, | ||
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true, | ||
"https://json-schema.org/draft/2020-12/vocab/validation": true, | ||
"https://json-schema.org/draft/2020-12/vocab/meta-data": true, | ||
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true, | ||
"https://json-schema.org/draft/2020-12/vocab/content": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
"title": "Core and Validation specifications meta-schema", | ||
"allOf": [ | ||
{ | ||
"$ref": "meta/core" | ||
}, | ||
{ | ||
"$ref": "meta/applicator" | ||
}, | ||
{ | ||
"$ref": "meta/unevaluated" | ||
}, | ||
{ | ||
"$ref": "meta/validation" | ||
}, | ||
{ | ||
"$ref": "meta/meta-data" | ||
}, | ||
{ | ||
"$ref": "meta/format-annotation" | ||
}, | ||
{ | ||
"$ref": "meta/content" | ||
} | ||
], | ||
"type": [ | ||
"object", | ||
"boolean" | ||
], | ||
"$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", | ||
"properties": { | ||
"definitions": { | ||
"$comment": "\"definitions\" has been replaced by \"$defs\".", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$dynamicRef": "#meta" | ||
}, | ||
"deprecated": true, | ||
"default": {} | ||
}, | ||
"dependencies": { | ||
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"anyOf": [ | ||
{ | ||
"$dynamicRef": "#meta" | ||
}, | ||
{ | ||
"$ref": "meta/validation#/$defs/stringArray" | ||
} | ||
] | ||
}, | ||
"deprecated": true, | ||
"default": {} | ||
}, | ||
"$recursiveAnchor": { | ||
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".", | ||
"$ref": "meta/core#/$defs/anchorString", | ||
"deprecated": true | ||
}, | ||
"$recursiveRef": { | ||
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", | ||
"$ref": "meta/core#/$defs/uriReferenceString", | ||
"deprecated": true | ||
} | ||
} | ||
} |