diff --git a/DEPENDENCIES b/DEPENDENCIES index 2ba8526..8b89553 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -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 diff --git a/configuration.json b/configuration.json index 9665251..2079c69 100644 --- a/configuration.json +++ b/configuration.json @@ -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" diff --git a/vendor/jsonschema-2019-09.mask b/vendor/jsonschema-2019-09.mask new file mode 100644 index 0000000..e133411 --- /dev/null +++ b/vendor/jsonschema-2019-09.mask @@ -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 diff --git a/vendor/jsonschema-2019-09/hyper-schema.json b/vendor/jsonschema-2019-09/hyper-schema.json new file mode 100644 index 0000000..28f9ad4 --- /dev/null +++ b/vendor/jsonschema-2019-09/hyper-schema.json @@ -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}" + } + ] +} diff --git a/vendor/jsonschema-2019-09/links.json b/vendor/jsonschema-2019-09/links.json new file mode 100644 index 0000000..96a600f --- /dev/null +++ b/vendor/jsonschema-2019-09/links.json @@ -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" + } + } + } + } +} diff --git a/vendor/jsonschema-2019-09/meta/applicator.json b/vendor/jsonschema-2019-09/meta/applicator.json new file mode 100644 index 0000000..24a1cc4 --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/applicator.json @@ -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": "#" } + } + } +} diff --git a/vendor/jsonschema-2019-09/meta/content.json b/vendor/jsonschema-2019-09/meta/content.json new file mode 100644 index 0000000..f6752a8 --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/content.json @@ -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": "#" } + } +} diff --git a/vendor/jsonschema-2019-09/meta/core.json b/vendor/jsonschema-2019-09/meta/core.json new file mode 100644 index 0000000..eb708a5 --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/core.json @@ -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": {} + } + } +} diff --git a/vendor/jsonschema-2019-09/meta/format.json b/vendor/jsonschema-2019-09/meta/format.json new file mode 100644 index 0000000..09bbfdd --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/format.json @@ -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" } + } +} diff --git a/vendor/jsonschema-2019-09/meta/hyper-schema.json b/vendor/jsonschema-2019-09/meta/hyper-schema.json new file mode 100644 index 0000000..3d23058 --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/hyper-schema.json @@ -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}" + } + ] +} diff --git a/vendor/jsonschema-2019-09/meta/meta-data.json b/vendor/jsonschema-2019-09/meta/meta-data.json new file mode 100644 index 0000000..da04cff --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/meta-data.json @@ -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 + } + } +} diff --git a/vendor/jsonschema-2019-09/meta/validation.json b/vendor/jsonschema-2019-09/meta/validation.json new file mode 100644 index 0000000..9f59677 --- /dev/null +++ b/vendor/jsonschema-2019-09/meta/validation.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/meta/validation", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/validation": true + }, + "$recursiveAnchor": true, + + "title": "Validation vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +} diff --git a/vendor/jsonschema-2019-09/output/hyper-schema.json b/vendor/jsonschema-2019-09/output/hyper-schema.json new file mode 100644 index 0000000..34e6730 --- /dev/null +++ b/vendor/jsonschema-2019-09/output/hyper-schema.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/output/hyper-schema", + "title": "JSON Hyper-Schema Output", + "type": "array", + "items": { + "allOf": [ + {"$ref": "https://json-schema.org/draft/2019-09/links#/$defs/noRequiredFields" } + ], + "type": "object", + "required": [ + "contextUri", + "contextPointer", + "rel", + "attachmentPointer" + ], + "if": { "required": [ "hrefSchema" ] }, + "then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] }, + "else": { "required": [ "targetUri" ] }, + "properties": { + "contextUri": { + "$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance", + "type": "string", + "format": "uri" + }, + "contextPointer": { + "$comment": "The absolute JSON Pointer to the location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer", + "type": "string", + "format": "json-pointer" + }, + "rel": { + "type": "string" + }, + "targetUri": { + "$comment": "The fully resolved target URI", + "type": "string", + "format": "uri" + }, + "hrefInputTemplates": { + "$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.", + "type": "array", + "items": { + "type": "string", + "format": "uri-template" + } + }, + "hrefPrepopulatedInput": { + "$comment": "The initial data set to be presented with the input form when URI Template input is accepted.", + "type": "object", + "propertyNames": { + "$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3", + "pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$" + } + }, + "attachmentPointer": { + "$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies", + "type": "string", + "format": "json-pointer" + } + } + } +} diff --git a/vendor/jsonschema-2019-09/output/schema.json b/vendor/jsonschema-2019-09/output/schema.json new file mode 100644 index 0000000..bef8593 --- /dev/null +++ b/vendor/jsonschema-2019-09/output/schema.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/output/schema", + "description": "A schema that validates the minimum requirements for validation output", + + "oneOf": [ + { "$ref": "#/$defs/flag" }, + { "$ref": "#/$defs/basic" }, + { "$ref": "#/$defs/detailed" }, + { "$ref": "#/$defs/verbose" } + ], + "$defs": { + "outputUnit":{ + "properties": { + "valid": { "type": "boolean" }, + "keywordLocation": { + "type": "string", + "format": "uri-reference" + }, + "absoluteKeywordLocation": { + "type": "string", + "format": "uri" + }, + "instanceLocation": { + "type": "string", + "format": "uri-reference" + }, + "errors": { + "$ref": "#/$defs/outputUnitArray" + }, + "annotations": { + "$ref": "#/$defs/outputUnitArray" + } + }, + "required": [ "valid", "keywordLocation", "instanceLocation" ], + "allOf": [ + { + "if": { + "properties": { + "valid": { "const": false } + } + }, + "then": { + "required": [ "errors" ] + } + }, + { + "if": { + "anyOf": [ + { + "properties": { + "keywordLocation": { + "pattern": "/\\$ref/" + } + } + }, + { + "properties": { + "keywordLocation": { + "pattern": "/\\$recursiveRef/" + } + } + } + ] + }, + "then": { + "required": [ "absoluteKeywordLocation" ] + } + } + ] + }, + "outputUnitArray": { + "type": "array", + "items": { "$ref": "#/$defs/outputUnit" } + }, + "flag": { + "properties": { + "valid": { "type": "boolean" } + }, + "required": [ "valid" ] + }, + "basic": { "$ref": "#/$defs/outputUnit" }, + "detailed": { "$ref": "#/$defs/outputUnit" }, + "verbose": { "$ref": "#/$defs/outputUnit" } + } +} diff --git a/vendor/jsonschema-2019-09/schema.json b/vendor/jsonschema-2019-09/schema.json new file mode 100644 index 0000000..2248a0c --- /dev/null +++ b/vendor/jsonschema-2019-09/schema.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/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 + }, + "$recursiveAnchor": true, + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + {"$ref": "meta/core"}, + {"$ref": "meta/applicator"}, + {"$ref": "meta/validation"}, + {"$ref": "meta/meta-data"}, + {"$ref": "meta/format"}, + {"$ref": "meta/content"} + ], + "type": ["object", "boolean"], + "properties": { + "definitions": { + "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$recursiveRef": "#" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + } + } + } +}