-
-
Notifications
You must be signed in to change notification settings - Fork 321
"$vocabulary" and basic vocabulary support. #671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3f72dc5
Create new meta-schemas and vocabularies section
handrews b69e394
Generalize $schema from "version" to "feature set"
handrews 8d4ff3d
Add "$vocabulary" and the vocabularies concept
handrews b3d9acf
Core and Applicator vocabulary meta-schemas
handrews c5612bf
Fix vocab section indentation
handrews 8d47000
Make a section for identifying meta-schemas
handrews d7ad56a
Make the core vocabulary mandatory in "$vocabulary"
handrews d8314bd
Tweak the paragraph about who defines meta-schemas
handrews d3a9f99
Fix typo: additional[ly]
handrews 36840f8
$vocabulary is like other meta-schema keywords
handrews c9abdcb
More review feedback on "$vocabulary"
handrews 28a8d1b
Further $vocabulary wording feedback.
handrews b5290df
Have the "schema" meta-schema extend core
handrews f631c9e
Another vocabulary-related wording tweak
handrews 3f652a6
Further default vocabulary tweaks
handrews 529b5b1
Typo fixes from code review
jgonzalezdr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,61 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$id": "https://json-schema.org/draft-08/applicator", | ||
"$recursiveAnchor": true, | ||
"$vocabulary": { | ||
"https://json-schema.org/draft-08/vocabularies/core": true, | ||
"https://json-schema.org/draft-08/vocabularies/applicator": true | ||
}, | ||
|
||
"title": "Applicator vocabulary meta-schema", | ||
"$defs": { | ||
"schemaArray": { | ||
"type": "array", | ||
"minItems": 1, | ||
handrews marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"items": { "$recursiveRef": "#" } | ||
} | ||
}, | ||
"properties": { | ||
"additionalItems": { "$recursiveRef": "#" }, | ||
"unevaluatedItems": { "$recursiveRef": "#" }, | ||
"items": { | ||
"anyOf": [ | ||
{ "$recursiveRef": "#" }, | ||
{ "$ref": "#/$defs/schemaArray" } | ||
] | ||
}, | ||
"contains": { "$recursiveRef": "#" }, | ||
"additionalProperties": { "$recursiveRef": "#" }, | ||
"unevaluatedProperties": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$recursiveRef": "#" | ||
} | ||
}, | ||
"properties": { | ||
"type": "object", | ||
"additionalProperties": { "$recursiveRef": "#" }, | ||
"default": {} | ||
}, | ||
"patternProperties": { | ||
"type": "object", | ||
"additionalProperties": { "$recursiveRef": "#" }, | ||
"propertyNames": { "format": "regex" }, | ||
"default": {} | ||
}, | ||
"dependentSchemas": { | ||
handrews marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "object", | ||
"additionalProperties": { | ||
"$recursiveRef": "#" | ||
} | ||
}, | ||
"propertyNames": { "$recursiveRef": "#" }, | ||
"if": { "$recursiveRef": "#" }, | ||
"then": { "$recursiveRef": "#" }, | ||
"else": { "$recursiveRef": "#" }, | ||
"allOf": { "$ref": "#/$defs/schemaArray" }, | ||
"anyOf": { "$ref": "#/$defs/schemaArray" }, | ||
"oneOf": { "$ref": "#/$defs/schemaArray" }, | ||
"not": { "$recursiveRef": "#" } | ||
} | ||
} | ||
handrews marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,52 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-08/schema#", | ||
"$id": "https://json-schema.org/draft-08/core", | ||
"$recursiveAnchor": true, | ||
"$vocabulary": { | ||
"https://json-schema.org/draft-08/vocabularies/core": true | ||
}, | ||
|
||
"title": "Core vocabulary meta-schema", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"$id": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
}, | ||
"$schema": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"$ref": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
}, | ||
"$recursiveRef": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
}, | ||
"$recursiveAnchor": { | ||
"type": "boolean", | ||
"const": true, | ||
"default": false | ||
}, | ||
"$vocabulary": { | ||
"type": "object", | ||
"propertyNames": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"additionalProperties": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"$comment": { | ||
"type": "string" | ||
}, | ||
"$defs": { | ||
handrews marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "object", | ||
"additionalProperties": { "$recursiveRef": "#" }, | ||
"default": {} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.