-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JSON Schema 2020-12 meta-schemas
Signed-off-by: Juan Cruz Viotti <[email protected]>
- Loading branch information
Showing
16 changed files
with
611 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -111,6 +111,12 @@ | |
"email": "[email protected]", | ||
"github": "jsr-io", | ||
"website": "https://jsr.io" | ||
}, | ||
"jsonschema": { | ||
"title": "JSON Schema", | ||
"description": "The organisation responsible for the JSON Schema specification", | ||
"github": "json-schema-org", | ||
"website": "https://json-schema.org" | ||
} | ||
}, | ||
"schemas": { | ||
|
@@ -256,6 +262,10 @@ | |
"jsr": { | ||
"base": "https://jsr.io/schema", | ||
"path": "./vendor/jsr" | ||
}, | ||
"jsonschema/2020-12": { | ||
"base": "https://json-schema.org/draft/2020-12", | ||
"path": "./vendor/jsonschema-2020-12" | ||
} | ||
} | ||
} |
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,11 @@ | ||
adr | ||
archive | ||
.travis.yml | ||
CONTRIBUTING.md | ||
jsonschema-core.xml | ||
jsonschema-validation.xml | ||
Makefile | ||
README.md | ||
relative-json-pointer.xml | ||
output/verbose-example.json | ||
output/hyper-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,27 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/hyper-schema", | ||
"$id": "https://json-schema.org/draft/2020-12/hyper-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, | ||
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "JSON Hyper-Schema", | ||
"allOf": [ | ||
{ "$ref": "https://json-schema.org/draft/2020-12/schema" }, | ||
{ "$ref": "https://json-schema.org/draft/2020-12/meta/hyper-schema" } | ||
], | ||
"links": [ | ||
{ | ||
"rel": "self", | ||
"href": "{+%24id}" | ||
} | ||
] | ||
} |
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,85 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/links", | ||
"title": "Link Description Object", | ||
|
||
"type": "object", | ||
"properties": { | ||
"anchor": { | ||
"type": "string", | ||
"format": "uri-template" | ||
}, | ||
"anchorPointer": { | ||
"type": "string", | ||
"anyOf": [ | ||
{ "format": "json-pointer" }, | ||
{ "format": "relative-json-pointer" } | ||
] | ||
}, | ||
"rel": { | ||
"anyOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "array", | ||
"items": { "type": "string" }, | ||
"minItems": 1 | ||
} | ||
] | ||
}, | ||
"href": { | ||
"type": "string", | ||
"format": "uri-template" | ||
}, | ||
"hrefSchema": { | ||
"$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", | ||
"default": false | ||
}, | ||
"templatePointers": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string", | ||
"anyOf": [ | ||
{ "format": "json-pointer" }, | ||
{ "format": "relative-json-pointer" } | ||
] | ||
} | ||
}, | ||
"templateRequired": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"uniqueItems": true | ||
}, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"targetSchema": { | ||
"$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", | ||
"default": true | ||
}, | ||
"targetMediaType": { | ||
"type": "string" | ||
}, | ||
"targetHints": {}, | ||
"headerSchema": { | ||
"$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", | ||
"default": true | ||
}, | ||
"submissionMediaType": { | ||
"type": "string", | ||
"default": "application/json" | ||
}, | ||
"submissionSchema": { | ||
"$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", | ||
"default": true | ||
}, | ||
"$comment": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ "rel", "href" ] | ||
} |
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,48 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/applicator", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/applicator": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Applicator vocabulary meta-schema", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"prefixItems": { "$ref": "#/$defs/schemaArray" }, | ||
"items": { "$dynamicRef": "#meta" }, | ||
"contains": { "$dynamicRef": "#meta" }, | ||
"additionalProperties": { "$dynamicRef": "#meta" }, | ||
"properties": { | ||
"type": "object", | ||
"additionalProperties": { "$dynamicRef": "#meta" }, | ||
"default": {} | ||
}, | ||
"patternProperties": { | ||
"type": "object", | ||
"additionalProperties": { "$dynamicRef": "#meta" }, | ||
"propertyNames": { "format": "regex" }, | ||
"default": {} | ||
}, | ||
"dependentSchemas": { | ||
"type": "object", | ||
"additionalProperties": { "$dynamicRef": "#meta" }, | ||
"default": {} | ||
}, | ||
"propertyNames": { "$dynamicRef": "#meta" }, | ||
"if": { "$dynamicRef": "#meta" }, | ||
"then": { "$dynamicRef": "#meta" }, | ||
"else": { "$dynamicRef": "#meta" }, | ||
"allOf": { "$ref": "#/$defs/schemaArray" }, | ||
"anyOf": { "$ref": "#/$defs/schemaArray" }, | ||
"oneOf": { "$ref": "#/$defs/schemaArray" }, | ||
"not": { "$dynamicRef": "#meta" } | ||
}, | ||
"$defs": { | ||
"schemaArray": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { "$dynamicRef": "#meta" } | ||
} | ||
} | ||
} |
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,17 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/content", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/content": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Content vocabulary meta-schema", | ||
|
||
"type": ["object", "boolean"], | ||
"properties": { | ||
"contentEncoding": { "type": "string" }, | ||
"contentMediaType": { "type": "string" }, | ||
"contentSchema": { "$dynamicRef": "#meta" } | ||
} | ||
} |
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,51 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/core", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/core": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Core vocabulary meta-schema", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"$id": { | ||
"$ref": "#/$defs/uriReferenceString", | ||
"$comment": "Non-empty fragments not allowed.", | ||
"pattern": "^[^#]*#?$" | ||
}, | ||
"$schema": { "$ref": "#/$defs/uriString" }, | ||
"$ref": { "$ref": "#/$defs/uriReferenceString" }, | ||
"$anchor": { "$ref": "#/$defs/anchorString" }, | ||
"$dynamicRef": { "$ref": "#/$defs/uriReferenceString" }, | ||
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, | ||
"$vocabulary": { | ||
"type": "object", | ||
"propertyNames": { "$ref": "#/$defs/uriString" }, | ||
"additionalProperties": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"$comment": { | ||
"type": "string" | ||
}, | ||
"$defs": { | ||
"type": "object", | ||
"additionalProperties": { "$dynamicRef": "#meta" } | ||
} | ||
}, | ||
"$defs": { | ||
"anchorString": { | ||
"type": "string", | ||
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" | ||
}, | ||
"uriString": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"uriReferenceString": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
} | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Format vocabulary meta-schema for annotation results", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"format": { "type": "string" } | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/format-assertion": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Format vocabulary meta-schema for assertion results", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"format": { "type": "string" } | ||
} | ||
} |
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,29 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/hyper-schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/hyper-schema", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "JSON Hyper-Schema Vocabulary Schema", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"base": { | ||
"type": "string", | ||
"format": "uri-template" | ||
}, | ||
"links": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "https://json-schema.org/draft/2020-12/links" | ||
} | ||
} | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "self", | ||
"href": "{+%24id}" | ||
} | ||
] | ||
} |
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,37 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/meta-data", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/meta-data": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Meta-data vocabulary meta-schema", | ||
|
||
"type": ["object", "boolean"], | ||
"properties": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"default": true, | ||
"deprecated": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"readOnly": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"writeOnly": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"examples": { | ||
"type": "array", | ||
"items": true | ||
} | ||
} | ||
} |
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,15 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", | ||
"$vocabulary": { | ||
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true | ||
}, | ||
"$dynamicAnchor": "meta", | ||
|
||
"title": "Unevaluated applicator vocabulary meta-schema", | ||
"type": ["object", "boolean"], | ||
"properties": { | ||
"unevaluatedItems": { "$dynamicRef": "#meta" }, | ||
"unevaluatedProperties": { "$dynamicRef": "#meta" } | ||
} | ||
} |
Oops, something went wrong.