Skip to content

Commit

Permalink
Add JSON Schema 2019-09
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jan 17, 2025
1 parent 86fb717 commit 623d62b
Show file tree
Hide file tree
Showing 15 changed files with 629 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ cloudevents-1-0-2 https://github.com/cloudevents/spec v1.0.2
riskine-ontology-1-0-0 https://github.com/riskine/ontology v1.0.0
jsr https://github.com/jsr-io/jsr 0e218a1d98b52f4c67b99a5c00742ffc3a3dda7d
jsonschema-2020-12 https://github.com/json-schema-org/json-schema-spec 769daad75a9553562333a8937a187741cb708c72
jsonschema-2019-09 https://github.com/json-schema-org/json-schema-spec 41014ea723120ce70b314d72f863c6929d9f3cfd
openapi https://github.com/OAI/OpenAPI-Specification 3.1.1
4 changes: 4 additions & 0 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@
"base": "https://json-schema.org/draft/2020-12",
"path": "./vendor/jsonschema-2020-12"
},
"jsonschema/2019-09": {
"base": "https://json-schema.org/draft/2019-09",
"path": "./vendor/jsonschema-2019-09"
},
"openapi/v1.2": {
"base": "https://raw.githubusercontent.com/oai/openapi-specification/master/schemas/v1.2",
"path": "./vendor/openapi/schemas/v1.2"
Expand Down
9 changes: 9 additions & 0 deletions vendor/jsonschema-2019-09.mask
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.travis.yml
CONTRIBUTING.md
jsonschema-core.xml
jsonschema-hyperschema.xml
jsonschema-validation.xml
Makefile
README.md
relative-json-pointer.xml
output/verbose-example.json
26 changes: 26 additions & 0 deletions vendor/jsonschema-2019-09/hyper-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
"$id": "https://json-schema.org/draft/2019-09/hyper-schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/core": true,
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
"https://json-schema.org/draft/2019-09/vocab/validation": true,
"https://json-schema.org/draft/2019-09/vocab/meta-data": true,
"https://json-schema.org/draft/2019-09/vocab/format": false,
"https://json-schema.org/draft/2019-09/vocab/content": true,
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
},
"$recursiveAnchor": true,

"title": "JSON Hyper-Schema",
"allOf": [
{"$ref": "https://json-schema.org/draft/2019-09/schema"},
{"$ref": "https://json-schema.org/draft/2019-09/meta/hyper-schema"}
],
"links": [
{
"rel": "self",
"href": "{+%24id}"
}
]
}
91 changes: 91 additions & 0 deletions vendor/jsonschema-2019-09/links.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/links",
"title": "Link Description Object",
"allOf": [
{ "required": [ "rel", "href" ] },
{ "$ref": "#/$defs/noRequiredFields" }
],
"$defs": {
"noRequiredFields": {
"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": {
"$ref": "https://json-schema.org/draft/2019-09/hyper-schema",
"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": {
"$ref": "https://json-schema.org/draft/2019-09/hyper-schema",
"default": true
},
"targetMediaType": {
"type": "string"
},
"targetHints": { },
"headerSchema": {
"$ref": "https://json-schema.org/draft/2019-09/hyper-schema",
"default": true
},
"submissionMediaType": {
"type": "string",
"default": "application/json"
},
"submissionSchema": {
"$ref": "https://json-schema.org/draft/2019-09/hyper-schema",
"default": true
},
"$comment": {
"type": "string"
}
}
}
}
}
56 changes: 56 additions & 0 deletions vendor/jsonschema-2019-09/meta/applicator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/applicator",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/applicator": true
},
"$recursiveAnchor": true,

"title": "Applicator vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"additionalItems": { "$recursiveRef": "#" },
"unevaluatedItems": { "$recursiveRef": "#" },
"items": {
"anyOf": [
{ "$recursiveRef": "#" },
{ "$ref": "#/$defs/schemaArray" }
]
},
"contains": { "$recursiveRef": "#" },
"additionalProperties": { "$recursiveRef": "#" },
"unevaluatedProperties": { "$recursiveRef": "#" },
"properties": {
"type": "object",
"additionalProperties": { "$recursiveRef": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$recursiveRef": "#" },
"propertyNames": { "format": "regex" },
"default": {}
},
"dependentSchemas": {
"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": "#" }
},
"$defs": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$recursiveRef": "#" }
}
}
}
17 changes: 17 additions & 0 deletions vendor/jsonschema-2019-09/meta/content.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/content",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/content": true
},
"$recursiveAnchor": true,

"title": "Content vocabulary meta-schema",

"type": ["object", "boolean"],
"properties": {
"contentMediaType": { "type": "string" },
"contentEncoding": { "type": "string" },
"contentSchema": { "$recursiveRef": "#" }
}
}
57 changes: 57 additions & 0 deletions vendor/jsonschema-2019-09/meta/core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/core",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/core": true
},
"$recursiveAnchor": true,

"title": "Core vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"$id": {
"type": "string",
"format": "uri-reference",
"$comment": "Non-empty fragments not allowed.",
"pattern": "^[^#]*#?$"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$anchor": {
"type": "string",
"pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
},
"$ref": {
"type": "string",
"format": "uri-reference"
},
"$recursiveRef": {
"type": "string",
"format": "uri-reference"
},
"$recursiveAnchor": {
"type": "boolean",
"default": false
},
"$vocabulary": {
"type": "object",
"propertyNames": {
"type": "string",
"format": "uri"
},
"additionalProperties": {
"type": "boolean"
}
},
"$comment": {
"type": "string"
},
"$defs": {
"type": "object",
"additionalProperties": { "$recursiveRef": "#" },
"default": {}
}
}
}
14 changes: 14 additions & 0 deletions vendor/jsonschema-2019-09/meta/format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/format",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/format": true
},
"$recursiveAnchor": true,

"title": "Format vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"format": { "type": "string" }
}
}
29 changes: 29 additions & 0 deletions vendor/jsonschema-2019-09/meta/hyper-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
"$id": "https://json-schema.org/draft/2019-09/meta/hyper-schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
},
"$recursiveAnchor": true,

"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/2019-09/links"
}
}
},
"links": [
{
"rel": "self",
"href": "{+%24id}"
}
]
}
37 changes: 37 additions & 0 deletions vendor/jsonschema-2019-09/meta/meta-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/meta-data",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/meta-data": true
},
"$recursiveAnchor": true,

"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
}
}
}
Loading

0 comments on commit 623d62b

Please sign in to comment.