diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/annotation-model/definitions | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/annotation-model/definitions')
7 files changed, 4496 insertions, 0 deletions
diff --git a/testing/web-platform/tests/annotation-model/definitions/annotations.json b/testing/web-platform/tests/annotation-model/definitions/annotations.json new file mode 100644 index 0000000000..df1f73613a --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/annotations.json @@ -0,0 +1,212 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "annotations.json", + "title": "Definitions: Annotations.", + "description": "Schemas in #/definitions detect or validate keys/objects (direct children) uniquely used to describe Annotations (Section 3.1 and 3.3.5).", + "definitions": { + + "contextValueFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid @context string", + "description": "True when the string has value http://www.w3.org/ns/anno.jsonld (Section 3.1)", + "type": "string", + "enum": [ "http://www.w3.org/ns/anno.jsonld" ] + }, + + "contextValueInArrayFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid @context string found in array", + "description": "True when the array contains a string item having value http://www.w3.org/ns/anno.jsonld (Section 3.1)", + "type": "array", + "not": + { "items": + { "not": + { "$ref": "#/definitions/contextValueFound" } + } + } + }, + + "annotationTypeValueRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid annotation type value string", + "description": "True when the string has value 'Annotation' (Section 3.1)", + "type": "string", + "enum": [ "Annotation" ] + }, + + "annotationTypeValueInArrayRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid annotation type array", + "description": "True when the array contains a string item having value 'Annotation' (Section 3.1)", + "type": "array", + "not": + { "items": + { "not": + { "$ref": "#/definitions/annotationTypeValueRecognized" } + } + } + }, + + "annotationTypeValueFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Implementation: Annotation type", + "description": "True when the Annotation has type key and 'Annotation' is a value of type (Section 3.1)", + "type": "object", + "required": [ "type" ], + "properties": { + "type": { + "oneOf": [ + { "$ref": "annotations.json#/definitions/annotationTypeValueRecognized" }, + { "$ref": "annotations.json#/definitions/annotationTypeValueInArrayRecognized" } + ] + } + } + }, + + "motivationList": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: list of motivation and purposes", + "description": "List of motivations and purposes as defined in the model (Section 3.3.5).", + "type": "string", + "enum": ["assessing", "bookmarking", "classifying", "commenting", "describing", "editing", "highlighting", "identifying", "linking", "moderating", "questioning", "replying", "tagging" ] + }, + + "motivationRecognizedIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: motivation value", + "description": "True when the annotation has 0 or more motivation property values (Section 3.3.5)", + "type": "object", + "properties": {"motivation": + { "oneOf": [ + { "$ref": "#/definitions/motivationList" }, + { "type": "array", + "minItems": 1, + "items": { "$ref": "#/definitions/motivationList" } } + ] + } + } + }, + + "motivationSingularIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: singular motivation value", + "description": "True when the annotation has 0 or exactly one motivation property value (Section 3.3.5)", + "type": "object", + "properties": {"motivation": + { "oneOf": [ + { "$ref": "#/definitions/motivationList" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "$ref": "#/definitions/motivationList" } } + ] + } + } + }, + + "motivationPropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: via motivation with qualifying annotation class", + "description": "Supports implementation check of via (if/when) used on Annotation (Sections 3.3.5)", + "oneOf": [ + {"$ref": "#/definitions/annotationTypeValueFound"} + ], + "allOf": [ + {"required": ["motivation"]}, + {"$ref": "#/definitions/motivationRecognizedIfPresent"} + ] + }, + + "singleMotivationPropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: via motivation with qualifying annotation class", + "description": "Supports implementation check of via (if/when) used on Annotation (Sections 3.3.5)", + "oneOf": [ + {"$ref": "#/definitions/annotationTypeValueFound"} + ], + "allOf": [ + {"required": ["motivation"]}, + {"$ref": "#/definitions/motivationSingularIfPresent"} + ] + }, + + "stylesheetValueDefinition": + { + "title": "Definition: stylesheet value", + "description": "True when Annotation has no stylesheet, references an external stylesheet, or has embedded stylesheet of type CssStylesheet (Section 4.4)", + "type": "object", + "properties": + { + "stylesheet": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri"}, + { "type": "object", + "properties": + { + "type": { "type": "string", + "enum": [ "CssStylesheet" ]}, + "id": { "$ref": "id.json#/definitions/stringUri" }, + "value": { "type": "string" } + }, + "not": { "required": [ "id", "value"] }, + "oneOf": [ + { "required": [ "id"] }, + { "required": [ "value"] } + ] + } + ] + } + } + }, + + "stylesheetDetected": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation stylesheet", + "description": "True when the Annotation has a valid stylesheet property (Section 4.4)", + "allOf": [ + {"required": ["stylesheet"]}, + {"$ref": "#/definitions/stylesheetValueDefinition"} + ] + }, + + "bodyValueValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: bodyValue", + "description": "True when the Annotation has no bodyValue key or has a bodyValue key with valid value (Section 3.2.5)", + "type": "object", + "properties": + { + "bodyValue": + { + "oneOf": + [ + { "type": "string" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "type": "string" } + } + ] + } + } + }, + + "bodyValueFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": " Implementation: bodyValue", + "description": "True when the Annotation has a valid bodyValue (Section 3.2.5)", + "allOf": + [ + { "$ref": "#/definitions/bodyValueValidIfPresent" }, + { "required": [ "bodyValue" ] } + ] + } + + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json b/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json new file mode 100644 index 0000000000..8c09b14aa4 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/bodyTarget.json @@ -0,0 +1,1091 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "bodyTarget.json", + "title": "Definitions: Bodies and Targets.", + "description": "Schemas in #/definitions detect or validate keys, objects or constraints variously applicable to Bodies and/or Targets (Section 3.2.1 - 3.2.6). Excludes Choice, Set and Specific Resources.", + "definitions": + { + "externalWebResourceDetected": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: External Web Resource", + "description": "True when the object is an External Web Resource, i.e., includes an id that is of format uri but does not contain source (Specific Resource) keys (Sections 3.2.1, 3.2.4, 4).", + "type": "object", + "allOf": [ {"$ref": "id.json#/definitions/idValueFound"} ], + "not": + { "anyOf": + [ + { "required": ["source"] }, + { "required": ["target"] } + ] + } + }, + + "sourceEwrDetected": + { + "type": "object", + "properties": + { + "source": {"$ref": "#/definitions/externalWebResourceDetected"} + } + }, + + "itemEwrDetected": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/externalWebResourceDetected" } } } + } + } + }, + + "textualBodyFound" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Embedded Textual Body", + "description": "True when the object is an Embedded Textual Body, i.e., includes the value key (Section 3.2.4).", + "type" : "object", + "properties" : + { + "value": + { + "type": "string" + } + }, + "required": [ "value" ] + } , + + "itemETBDetected": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/textualBodyFound" } } } + } + } + }, + + "targetResourcesFound" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Resources that can be used as Target", + "description": "True when the string is format uri or the object is recognized as a valid target resource (Sections 3.2 and 4).", + "type" : ["string", "object"], + "oneOf": [ + {"$ref": "id.json#/definitions/stringUri"}, + {"$ref": "choiceSet.json#/definitions/choiceDetected" }, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" } + ] + }, + + "bodyResourcesFound" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Resources that can be used as Body", + "description": "True when the string is format uri or the object is recognized as a valid body resource (Sections 3.2 and 4).", + "type" : ["string", "object"], + "anyOf": [ + {"$ref": "id.json#/definitions/stringUri"}, + {"$ref": "choiceSet.json#/definitions/choiceDetected" }, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ] + }, + + "optionalBodyPropertiesShould" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Optional Body Keys Should Validations", + "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "$ref": "#/definitions/resourceTypeShouldIfPresent" }, + { "$ref": "#/definitions/formatValidIfPresent" }, + { "$ref": "#/definitions/languageValidIfPresent" }, + { "$ref": "#/definitions/processingLanguageValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" } + ] + }, + + "optionalBodyPropertiesMust" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Optional Body Keys Must Validations", + "description": "Supports validity checks of optional keys (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "$ref": "#/definitions/textDirectionValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } + ] + }, + + "optionalBodyPurposePropertyShould" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Optional Purpose Key", + "description": "Supports validity checks of optional purpose key (if/when) used on Specific Resources or Textual Body Resources (Sections 3.3.5)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "$ref": "otherProperties.json#/definitions/purposeRecognizedIfPresent" } + ] + }, + + "optionalTargetPropertiesShould" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Optional Target Keys Should validation", + "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" } + ], + "allOf" : + [ + { "$ref": "#/definitions/resourceTypeShouldIfPresent" }, + { "$ref": "#/definitions/formatValidIfPresent" }, + { "$ref": "#/definitions/languageValidIfPresent" }, + { "$ref": "#/definitions/processingLanguageValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/creatorValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/generatorValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/audienceValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/accessibilityValidIfPresent" } + ] + }, + + "optionalTargetPropertiesMust" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Optional Target Keys Must validation", + "description": "Supports validity check of optional keys (if/when) used on External Web Resources, Specific Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" } + ], + "allOf" : + [ + { "$ref": "#/definitions/textDirectionValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/generatedValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" }, + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } + ] + }, + + "resourceTypeRecognizedIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: body / target classes", + "description": "True when type value for body / target is or includes item from recommended list of classes (Section 3.2.2)", + "type": "object", + "properties": + { + "type": + { "oneOf": + [ + { "type": "string", + "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": + { "type": "string", + "enum": [ "Dataset", "Image", "Video", "Sound", "Text" ] } + } + } + } + ] + } + } + }, + + "resourceTypeShouldIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: body / target classes all from 3.2.2", + "description": "Adds TextualBody to list from 3.2.2. True when type absent or all type value(s) for body / target are from recommended list of classes (Section 3.2.2), or TextualBody", + "type": "object", + "properties": + { + "type": + { "oneOf": + [ + { "type": "string", + "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] }, + { "type": "array", + "minItems": 1, + "items": + { "type": "string", + "enum": [ "Dataset", "Image", "Video", "Sound", "Text", "TextualBody" ] } + } + ] + } + } + }, + + "recognizedTypeFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: type key with recognized classes", + "description": "Supports implementation check of type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.2)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["type" ] }, + { "$ref": "#/definitions/resourceTypeRecognizedIfPresent" } + ] + + }, + + "itemRecognizedTypeFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having type key with qualifying body/target classes", + "description": "Supports implementation check of items having type (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/recognizedTypeFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceRecognizedTypeFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having type key", + "description": "Supports implementation check of type (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["type"] , + "$ref": "#/definitions/resourceTypeRecognizedIfPresent" + } + }, + "required": ["source"] + }, + + "formatValueCheck": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: format value regex", + "description": "True when string value starts with a registered top-level Media type, including trailing slash (Section 3.2.1)", + "type": "string", + "pattern": "^(application/|audio/|example/|image/|multipart/|text/|video/)" + }, + + "formatValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: format validity", + "description": "True when the body or target has no format or has a valid format value - single string or array of strings (Section 3.2.1)", + "type": "object", + "properties": + { + "format": + { + "oneOf": + [ + {"$ref": "#/definitions/formatValueCheck"}, + {"type": "array", + "minItems": 1, + "items" : {"$ref": "#/definitions/formatValueCheck"} + } + ] + } + } + }, + + "formatSingularIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: format", + "description": "True when the body or target format value, if present, is singular and valid (Section 3.2.1)", + "type": "object", + "properties": + { + "format": + { + "oneOf": + [ + {"$ref": "#/definitions/formatValueCheck"}, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items" : {"$ref": "#/definitions/formatValueCheck"} } + ] + } + } + }, + + "formatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: format key with qualifying body/target classes", + "description": "Supports implementation check of format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["format" ] }, + { "$ref": "#/definitions/formatValidIfPresent" } + ] + }, + + "itemFormatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having format key with qualifying body/target classes", + "description": "Supports implementation check of items having format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/formatPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceFormatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having format key", + "description": "Supports implementation check of format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["format"] , + "$ref": "#/definitions/formatValidIfPresent" + } + }, + "required": ["source"] + }, + + "singleFormatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: format key with qualifying body/target classes", + "description": "Supports implementation check of format being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["format"] }, + { "$ref": "#/definitions/formatSingularIfPresent" } + ] + }, + + "itemSingleFormatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having singular format key with qualifying body/target classes", + "description": "Supports implementation check of items having singular format (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/singleFormatPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceSingleFormatPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having single format key value", + "description": "Supports implementation check of singular format (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["format"] , + "$ref": "#/definitions/formatSingularIfPresent" + } + }, + "required": ["source"] + }, + + "languageValueCheck" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: language value regex", + "description": "True when string value starts with a two or three lc characters and a hyphen or end of string (Section 3.2.1)", + "type": "string", + "oneOf" : + [ + {"pattern": "^([a-z]){2,3}$"}, + {"pattern": "^([a-z]){2,3}-"} + ] + + }, + + "languageValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: language value", + "description": "True when the body or target has no language or has a valid language value - single string or array of strings (Section 3.2.1)", + "type": "object", + "properties": + { + "language": + { + "oneOf": + [ + {"$ref": "#/definitions/languageValueCheck"}, + {"type": "array", + "minItems": 1, + "items" : {"$ref": "#/definitions/languageValueCheck"} + } + ] + } + } + }, + + "languageSingularIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definitions: single language valid", + "description": "True when the body or target has no language or has exactly one language property - single string (Section 3.2.1)", + "type": "object", + "properties": + { + "language": + { + "oneOf": + [ + {"$ref": "#/definitions/languageValueCheck"}, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items" : {"$ref": "#/definitions/languageValueCheck"} } + ] + } + } + }, + + "languagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: language key with qualifying body/target classes", + "description": "Supports implementation check of language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["language" ] }, + { "$ref": "#/definitions/languageValidIfPresent" } + ] + }, + + "itemLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having language key with qualifying body/target classes", + "description": "Supports implementation check of items having language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/languagePropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having language key", + "description": "Supports implementation check of language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["language"] , + "$ref": "#/definitions/languageValidIfPresent" + } + }, + "required": ["source"] + }, + + "singleLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: language key with qualifying body/target classes", + "description": "Supports implementation check of language being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["language"] }, + { "$ref": "#/definitions/languageSingularIfPresent" } + ] + }, + + "itemSingleLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having singular language key with qualifying body/target classes", + "description": "Supports implementation check of items having singular language (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/singleLanguagePropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceSingleLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having single language key value", + "description": "Supports implementation check of singular language (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["language"] , + "$ref": "#/definitions/languageSingularIfPresent" + } + }, + "required": ["source"] + }, + + "processingLanguageValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: processingLanguage", + "description": "True when the Body or Target has no processingLanguage or exactly one processingLanguage property (Section 3.2.1)", + "type": "object", + "properties": + { + "processingLanguage": + { + "oneOf": + [ + {"$ref": "#/definitions/languageValueCheck"}, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items" : {"$ref": "#/definitions/languageValueCheck"} } + ] + } + } + }, + + "processingLanguagePropertyFound" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: processingLanguage Key with qualifying body/target classes", + "description": "Supports implementation check of processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["processingLanguage" ] }, + { "$ref": "#/definitions/processingLanguageValidIfPresent" } + ] + }, + + "itemProcessingLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having processingLanguage key with qualifying body/target classes", + "description": "Supports implementation check of items having processingLanguage (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/processingLanguagePropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceProcessingLanguagePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having processingLanguage key", + "description": "Supports implementation check of processingLanguage (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["processingLanguage"] , + "$ref": "#/definitions/processingLanguageValidIfPresent" + } + }, + "required": ["source"] + }, + + "textDirectionValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: textDirection", + "description": "True when the body or target has no textDirection or exactly one valid textDirection (Section 3.2.1)", + "type": "object", + "properties": + { + "textDirection": + { + "oneOf": + [ + {"type": "string", + "enum": ["ltr", "rtl", "auto"] }, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items" : {"type": "string", + "enum": ["ltr", "rtl", "auto"] } } + ] + } + } + }, + + "textDirectionPropertyFound" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: textDirection Key with qualifying body/target classes", + "description": "Supports implementation check of textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": + [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + {"$ref": "#/definitions/externalWebResourceDetected" }, + {"$ref": "#/definitions/textualBodyFound" } + ], + "allOf" : + [ + { "required": ["textDirection" ] }, + { "$ref": "#/definitions/textDirectionValidIfPresent" } + ] + }, + + "itemTextDirectionPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having textDirection key with qualifying body/target classes", + "description": "Supports implementation check of items having textDirection (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/textDirectionPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceTextDirectionPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having textDirection key", + "description": "Supports implementation check of textDirection (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["textDirection"] , + "$ref": "#/definitions/textDirectionValidIfPresent" + } + }, + "required": ["source"] + }, + + "ewrWithItems" : + { + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/externalWebResourceDetected"}, + { "required": [ "items" ] } + ] + }, + + "sourceEwrWithItems": + { + "type": "object", + "properties": + { + "source": {"$ref": "#/definitions/ewrWithItems"} + }, + "required": ["source"] + }, + + "itemEwrWithItems": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/ewrWithItems" } } } + } + }, + "required": ["items"] + }, + + "ewrWithPurpose" : + { + "allOf": + [ + { "$ref": "#/definitions/externalWebResourceDetected"}, + { "required": [ "purpose" ] } + ] + }, + + "sourceEwrWithPurpose": + { + "type": "object", + "properties": + { + "source": {"$ref": "#/definitions/ewrWithPurpose"} + }, + "required": ["source"] + }, + + "itemEwrWithPurpose": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/ewrWithPurpose" } } } + } + }, + "required": ["items"] + }, + + "embeddedTextualBodyWithItems" : + { + "allOf": + [ + { "$ref": "#/definitions/textualBodyFound"}, + { "required": [ "items" ] } + ] + }, + + "itemETBWithItems": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithItems" } } } + } + }, + "required": ["items"] + }, + + "embeddedTextualBodyWithSource" : + { + "allOf": + [ + { "$ref": "#/definitions/textualBodyFound"}, + { "required": [ "source" ] } + ] + }, + + "itemETBWithSource": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/embeddedTextualBodyWithSource" } } } + } + }, + "required": ["items"] + }, + + "embeddedTextTypeIncludesTextualBody": + { + "allOf": + [ + { "$ref": "#/definitions/textualBodyFound" }, + { "required": ["type"] }, + { "properties": + { + "type": + { + "oneOf": + [ + { "type": "string", + "enum": ["TextualBody"] }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "enum": [ "TextualBody"] } } + } + } + ] + } + } + } + ] + }, + + "embeddedTextTypeInclTextualBodyWithoutId": + { + "allOf": + [ + { "$ref": "#/definitions/textualBodyFound" }, + { "required": ["type"] }, + { "properties": + { + "type": + { + "oneOf": + [ + { "type": "string", + "enum": ["TextualBody"] }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "enum": [ "TextualBody"] } } + } + } + ] + } + } + }, + { "not": { "$ref": "id.json#/definitions/idValueFound" } } + ] + }, + + "itemEmbeddedTextTypeIncludesTextualBody": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } } + } + } + }, + "required": ["items"] + }, + + "itemEmbeddedTextTypeInclTextualBodyWithoutId": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesTextualBody" } } + } + } + }, + "required": ["items"], + "not": { "$ref": "id.json#/definitions/idValueFound" } + }, + +"embeddedTextTypeIncludesText": + { + "allOf": + [ + { "$ref": "#/definitions/textualBodyFound" }, + { "required": ["type"] }, + { "properties": + { + "type": + { + "oneOf": + [ + { "type": "string", + "enum": ["Text"] }, + { "type": "array", + "minItems": 1, + "not": + { "items": + { "not": { "enum": [ "Text"] } } + } + } + ] + } + } + } + ] + }, + + "itemEmbeddedTextTypeIncludesText": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/embeddedTextTypeIncludesText" } } + } + } + }, + "required": ["items"] + } + + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/choiceSet.json b/testing/web-platform/tests/annotation-model/definitions/choiceSet.json new file mode 100644 index 0000000000..aafb27bb26 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/choiceSet.json @@ -0,0 +1,127 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "choiceSet.json", + "title": "Definitions: Choice.", + "description": "Schemas in #/definitions detect or validate keys/objects used in describing Choice (Sections 3.2.7 and 3.2.8).", + "definitions": + { + + "itemsDetected" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: items", + "description": "True when the object includes items key and value of items is an array containing at least 1 item, which can be a specificResource, an externalWebResource, a uri, a textualBody or another choice/set (Sections 3.2.7 and 3.2.8).", + "type": "object", + "properties" : + { + "items" : + { + "type" : "array", + "minItems": 1, + "items": { + "oneOf": + [ + { "$ref": "specificResource.json#/definitions/specificeResourceDetected" }, + { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected" }, + { "$ref": "bodyTarget.json#/definitions/textualBodyFound" }, + { "$ref": "id.json#/definitions/stringUri" }, + { "allOf": + [ + { "$ref" : "#/definitions/choiceOrSetTypeDefinition" }, + { "$ref": "#/definitions/itemsDetected" } + ] + } + ] + } + } + }, + "required": [ "items" ] + }, + + "choiceTypeDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Choice type", + "description": "True when object has type key and object's type is 'Choice' (Section 3.2.7)", + "type": "object", + "properties": + { + "type": + { + "type": "string", + "enum": ["Choice"] + } + }, + "required": [ "type" ] + }, + + "choiceOrSetTypeDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Choice or Set type", + "description": "True when object has type key and object's type is any of 'Choice' (Section 3.2.7)", + "type": "object", + "properties": + { + "type": + { + "type": "string", + "enum": ["Choice"] + } + }, + "required": [ "type" ] + }, + + "choiceDetected": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Detection: Choice", + "description": "True when object's type is 'Choice' and the object has an items array (Section 3.2.7)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/choiceTypeDefinition" }, + { "$ref": "#/definitions/itemsDetected" } + ] + }, + + "choiceOrSetDetected": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Detection: Choice or Set", + "description": "True when object's type is one of Choice and the object has an items array (Section 3.2.7)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/choiceOrSetTypeDefinition" }, + { "$ref": "#/definitions/itemsDetected" } + ] + }, + + "choiceSetWithValue" : + { + "allOf": + [ + { "$ref": "#/definitions/choiceOrSetDetected" }, + { "required": [ "value" ] } + ] + }, + + "choiceSetWithSource" : + { + "allOf": + [ + { "$ref": "#/definitions/choiceOrSetDetected" }, + { "required": [ "source" ] } + ] + }, + + "choiceSetWithPurpose" : + { + "allOf": + [ + { "$ref": "#/definitions/choiceOrSetDetected" }, + { "required": [ "purpose" ] } + ] + } + + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/collections.json b/testing/web-platform/tests/annotation-model/definitions/collections.json new file mode 100644 index 0000000000..9f5b13a9f8 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/collections.json @@ -0,0 +1,428 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "collections.json", + "title": "Definitions: Annotation Collections.", + "description": "Schemas in #/definitions detect or validate keys/objects (direct children) uniquely used to describe Annotation Collections (Section 5.1 and 5.2).", + "definitions": { + + "contextValueFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid @context string included in Collection / Page description", + "description": "True when the string has value http://www.w3.org/ns/anno.jsonld (Section 5)", + "type": "string", + "enum": [ "http://www.w3.org/ns/anno.jsonld" ] + }, + + "contextValueInArrayFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid @context string found in array included in Collection / Page description", + "description": "True when the array contains a string item having value http://www.w3.org/ns/anno.jsonld (Section 5)", + "type": "array", + "not": + { "items": + { "not": + { "$ref": "#/definitions/contextValueFound" } + } + } + }, + + "annotationCollectionTypeValueRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid AnnotationCollection type value string included in Collection description", + "description": "True when the string has value 'AnnotationCollection' (Section 5.1)", + "type": "string", + "enum": [ "AnnotationCollection" ] + }, + + "annotationCollectionTypeValueInArrayRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid AnnotationCollection type in array included in Collection description", + "description": "True when the array contains a string item having value 'AnnotationCollection' (Section 5.1)", + "type": "array", + "not": + { "items": + { "not": + { "$ref": "#/definitions/annotationCollectionTypeValueRecognized" } + } + } + }, + + "annotationCollectionTypeValueFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Implementation: AnnotationCollection type", + "description": "True when the Annotation Collection has type key and 'AnnotationCollection' is a value of type (Section 5.1)", + "type": "object", + "required": [ "type" ], + "properties": { + "type": { + "oneOf": [ + { "$ref": "#/definitions/annotationCollectionTypeValueRecognized" }, + { "$ref": "#/definitions/annotationCollectionTypeValueInArrayRecognized" } + ] + } + } + }, + + "annotationPageTypeValueRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid AnnotationPage type value string included in Page description", + "description": "True when the string has value 'AnnotationPage' (Section 5.2)", + "type": "string", + "enum": [ "AnnotationPage" ] + }, + + "annotationPageTypeValueInArrayRecognized": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Valid AnnotationPage type in array included in Page description", + "description": "True when the array contains a string item having value 'AnnotationPage' (Section 5.2)", + "type": "array", + "not": + { "items": + { "not": + { "$ref": "#/definitions/annotationPageTypeValueRecognized" } + } + } + }, + + "annotationPageTypeValueFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Implementation: AnnotationPage type", + "description": "True when the Annotation Page has type key and 'AnnotationPage' is a value of type (Section 5.2)", + "type": "object", + "required": [ "type" ], + "properties": { + "type": { + "oneOf": [ + { "$ref": "#/definitions/annotationPageTypeValueRecognized" }, + { "$ref": "#/definitions/annotationPageTypeValueInArrayRecognized" } + ] + } + } + }, + + "labelDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: label (Annotation Collections)", + "description": "True when the object has no label or has one or more label values of type string (Section 5.1)", + "type": "object", + "properties": + { + "label": + { + "oneOf": + [ + {"type": "string" }, + {"type": "array", + "minItems": 1, + "items": {"type": "string"} + } + ] + } + } + }, + + "labelFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Collection label", + "description": "True when the object has one or more label value(s) (Section 5.1)", + "allOf": [ + {"required": ["label"]}, + {"$ref": "#/definitions/labelDefinition"} + ] + }, + + "totalDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: total (Annotation Collections)", + "description": "True when the object has no total key or has exactly one total value of type integer greater or equal to zero (Section 5.1)", + "type": "object", + "properties": + { + "total": + { + "oneOf": + [ + {"type": "integer", + "minimum": 0 }, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items": {"type": "integer", + "minimum": 0 } + } + ] + } + } + }, + + "totalFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Collection total key", + "description": "True when the object has exactly one total value (Section 5.1)", + "allOf": [ + {"required": ["total"]}, + {"$ref": "#/definitions/totalDefinition"} + ] + }, + + "totalMoreThanZero": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: total more than zero (Annotation Collections)", + "description": "True when the object has exactly one total value of type integer and greater than zero (Section 5.1)", + "type": "object", + "properties": + { + "total": + { + "oneOf": + [ + {"type": "integer", + "minimum": 0, + "exclusiveMinimum": true}, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items": {"type": "integer", + "minimum": 0, + "exclusiveMinimum": true} + } + ] + } + }, + "required": [ "total" ] + }, + + "firstValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: first value (Annotation Collection)", + "description": "True when the Annotation Collection has no first key or has 1 first key value that is string of format uri or has first key value that is an object of type AnnotationPage (Section 5.1)", + "type": "object", + "properties": {"first": + { "oneOf": [ + { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/annotationPageTypeValueFound" } + ] + }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/annotationPageTypeValueFound" } + ] + } + } + ] + } + } + }, + + "firstFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Collection first key", + "description": "True when the object has exactly one first value (Section 5.1)", + "allOf": [ + {"required": ["first"]}, + {"$ref": "#/definitions/firstValidIfPresent"} + ] + }, + + "firstRequiredIfTotalMoreThanZero": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "If total greater than zero, check for implementation of Annotation Collection first key", + "description": "True when the object has no total or has total = zero or has exactly one first value (Section 5.1)", + "type": "object", + "oneOf": [ + { + "allOf": [ + { "$ref": "#/definitions/totalMoreThanZero" }, + { "$ref": "#/definitions/firstFound" } + ] + }, + { "not": { "$ref": "#/definitions/totalMoreThanZero" } } + ] + }, + + "lastValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: last value (Annotation Collection)", + "description": "True when the Annotation Collection has no last key or has 1 last key value that is string of format uri (Section 5.1)", + "type": "object", + "properties": {"last": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri" } + } + ] + } + } + }, + + "lastFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Collection last key", + "description": "True when the object has exactly one last value that is string of format uri (Section 5.1)", + "allOf": [ + {"required": ["last"]}, + {"$ref": "#/definitions/lastValidIfPresent"} + ] + }, + + "partOfValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: partOf value (Annotation Page)", + "description": "True when the Annotation Page has no partOf key or has 1 partOf key value that is string of format uri (Section 5.2)", + "type": "object", + "properties": {"partOf": + { "oneOf": [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "id.json#/definitions/idValueFound" } + ] + } + } + }, + + "partOfFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Page partOf key", + "description": "True when the object has exactly one partOf value that is string of format uri (Section 5.2)", + "allOf": [ + {"required": ["partOf"]}, + {"$ref": "#/definitions/partOfValidIfPresent"} + ] + }, + + "nextValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: next value (Annotation Page)", + "description": "True when the Annotation Page has no next key or has 1 next key value that is string of format uri (Section 5.2)", + "type": "object", + "properties": {"next": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri" } + } + ] + } + } + }, + + "nextFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Page next key", + "description": "True when the object has exactly one next value that is string of format uri (Section 5.2)", + "allOf": [ + {"required": ["next"]}, + {"$ref": "#/definitions/nextValidIfPresent"} + ] + }, + + "prevValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: prev value (Annotation Page)", + "description": "True when the Annotation Page has no prev key or has 1 prev key value that is string of format uri (Section 5.2)", + "type": "object", + "properties": {"prev": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri" } + } + ] + } + } + }, + + "prevFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Page prev key", + "description": "True when the object has exactly one prev value that is string of format uri (Section 5.2)", + "allOf": [ + {"required": ["prev"]}, + {"$ref": "#/definitions/prevValidIfPresent"} + ] + }, + + "startIndexDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: startIndex (Annotation Pages)", + "description": "True when the object has no startIndex key or has exactly one startIndex value of type integer greater or equal to zero (Section 5.2)", + "type": "object", + "properties": + { + "startIndex": + { + "oneOf": + [ + {"type": "integer", + "minimum": 0 }, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items": {"type": "integer", + "minimum": 0 } + } + ] + } + } + }, + + "startIndexFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Page startIndex key", + "description": "True when the object has exactly one startIndex value (Section 5.2)", + "allOf": [ + {"required": ["startIndex"]}, + {"$ref": "#/definitions/startIndexDefinition"} + ] + }, + + "itemsFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Annotation Page items key", + "description": "True when the object has items key with value that is an array of strings of format uri and/or objects of type Annotation (Section 5.2)", + "type": "object", + "properties": + { "items": + { "type": "array", + "items": { + "oneOf":[ + { "$ref": "annotations.json#/definitions/annotationTypeValueFound" }, + { "type": "string", + "format": "uri" } + ] + } + } + }, + "required": [ "items" ] + } + + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/id.json b/testing/web-platform/tests/annotation-model/definitions/id.json new file mode 100644 index 0000000000..b037e87c94 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/id.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id" : "id.json", + "title": "Definitions: id key", + "description": "Schemas in #/definitions used to detect valid id (string of format uri or array containing 1 item of string, format uri).", + "definitions": + { + "stringUri" : + { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "string", + "format": "uri" + }, + + "arraySingleStringUri": + { + "oneOf": + [ + { "$ref": "#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { "$ref": "#/definitions/stringUri" } + } + ] + }, + + "idValueFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ "id" ], + "properties": { + "id" : { "$ref": "#/definitions/arraySingleStringUri" } + } + } + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/otherProperties.json b/testing/web-platform/tests/annotation-model/definitions/otherProperties.json new file mode 100644 index 0000000000..faa2231f30 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/otherProperties.json @@ -0,0 +1,1472 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "otherProperties.json", + "title": "Definitions: Other Properties.", + "description": "Schemas in #/definitions detect or validate keys, objects or constraints variously applicable to Annotations, Bodies, Targets, Specific Resources, Textual Bodies, Items, and/or Sources (Section 3.3).", + "definitions": { + + "createdValidIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: created value", + "description": "True when the object being tested (annotation, body, target...) has no created or has a single created of format date-time (Section 3.3.1)", + "type": "object", + "properties": {"created": {"oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "format": "date-time" + } + } + ]}} + }, + + "createdPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: created key with qualifying body/target classes", + "description": "Supports implementation check of created (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"$ref": "#/definitions/createdValidIfPresent"}, + {"required": ["created"]} + ] + }, + + "itemCreatedPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having created key with qualifying body/target classes", + "description": "Supports implementation check of items having created (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/createdPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceCreatedPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having created key", + "description": "Supports implementation check of created (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["created"] , + "$ref": "#/definitions/createdValidIfPresent" + } + }, + "required": ["source"] + }, + + "generatedValidIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: generated value", + "description": "True when the annotation, body or target has no generated or has a single generated of format date-time (Section 3.3.1)", + "type": "object", + "properties": {"generated": {"oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "format": "date-time" + } + } + ]}} + }, + + "generatedPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: generated key with qualifying body/target classes", + "description": "Supports implementation check of generated (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"} + ], + "allOf": [ + {"$ref": "#/definitions/generatedValidIfPresent"}, + {"required": ["generated"]} + ] + }, + + "modifiedValidIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: modified value", + "description": "True when the annotation, body or target has no modified or has a single modified of format date-time (Section 3.3.1)", + "type": "object", + "properties": {"modified": {"oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "format": "date-time" + } + } + ]}} + }, + + "modifiedPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: modified key with qualifying body/target classes", + "description": "Supports implementation check of modified (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"$ref": "#/definitions/modifiedValidIfPresent"}, + {"required": ["modified"]} + ] + }, + + "itemModifiedPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having modified key with qualifying body/target classes", + "description": "Supports implementation check of items having modified (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/modifiedPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceModifiedPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having modified key", + "description": "Supports implementation check of modified (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["modified"] , + "$ref": "#/definitions/modifiedValidIfPresent" + } + }, + "required": ["source"] + }, + + "creatorValidIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: creator value", + "description": "True when the annotation, body or target has one or more creators (Section 3.3.1)", + "type": "object", + "properties": {"creator": + {"oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" }, + { + "type": "array", + "minItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" } + ] + } + } + ] + } + } + }, + + "creatorSingularIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: creator value", + "description": "True when the annotation, body or target has exactly 1 creator (Section 3.3.1)", + "type": "object", + "properties": {"creator": + {"oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" }, + { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" } + ] + } + } + ] + } + } + }, + + "creatorPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: creator key with qualifying body/target classes", + "description": "Supports implementation check of creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["creator"]}, + {"$ref": "#/definitions/creatorValidIfPresent"} + ] + }, + + "itemCreatorPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having creator key with qualifying body/target classes", + "description": "Supports implementation check of items having creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceCreatorPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having creator key", + "description": "Supports implementation check of creator (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["creator"] , + "$ref": "#/definitions/creatorValidIfPresent" + } + }, + "required": ["source"] + }, + + "singleCreatorPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: creator key with qualifying body/target classes", + "description": "Supports implementation check of creator being singular (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["creator"]}, + {"$ref": "#/definitions/creatorSingularIfPresent"} + ] + }, + + "itemSingleCreatorPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having singular creator key with qualifying body/target classes", + "description": "Supports implementation check of items having singular creator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/singleCreatorPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceSingleCreatorPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having singular creator key", + "description": "Supports implementation check of singular creator (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["creator"] , + "$ref": "#/definitions/creatorSingularIfPresent" + } + }, + "required": ["source"] + }, + + "generatorValidIfPresent": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: generator value", + "description": "True when the annotation, body or target has a single generator (Section 3.3.1)", + "type": "object", + "properties": {"generator": + {"oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" }, + { + "type": "array", + "minItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object" } + ] + } + } + ] + } + } + }, + + "generatorPropertyFound": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: generator key with qualifying body/target classes", + "description": "Supports implementation check of generator (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.1)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"} + ], + "allOf": [ + {"required": ["generator"]}, + {"$ref": "#/definitions/generatorValidIfPresent"} + ] + }, + + "audienceDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: audience object", + "description": "True when object meets our requirements for audience value (Section 3.3.3)", + "type": "object", + "properties": { + "id": {"$ref": "id.json#/definitions/arraySingleStringUri"} , + "type": { + "oneOf": [ + { "type": "string", + "pattern": "^(schema:)"}, + { "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^(schema:)" + } + } + ] + } + }, + "patternProperties": { + "^(schema:)": { "type": ["string", "object", "array"] } + }, + "additionalProperties": false + }, + + "audienceValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: audience value", + "description": "True when no audience or audience property of the annotation, body, target, ... is valid (Section 3.3.3)", + "type": "object", + "properties": { + "audience": + { "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/audienceDefinition" }, + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/audienceDefinition" } + ] + } + } + ] + } + } + }, + + "audiencePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: audience key with qualifying body/target classes", + "description": "Supports implementation check of audience (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.3)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["audience"]}, + {"$ref": "#/definitions/audienceValidIfPresent"} + ] + }, + + "itemAudiencePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having audience key with qualifying body/target classes", + "description": "Supports implementation check of items having audience (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/audiencePropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceAudiencePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having audience key", + "description": "Supports implementation check of audience (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["audience"] , + "$ref": "#/definitions/audienceValidIfPresent" + } + }, + "required": ["source"] + }, + + "accessibilityValidIfPresent": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: accessibility value", + "description": "True when no accessibility or accessibility property of the body, target, ... is valid (Section 3.3.4)", + "type": "object", + "properties": { + "accessibility" : { + "oneOf": [ + { "type": "string" }, + { "type": "array" , + "minItems": 1, + "items": { + "type": "string" + } + } + ] + } + } + }, + + "accessibilityPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: accessibility key with qualifying body/target classes", + "description": "Supports implementation check of accessibility (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Section 3.3.4)", + "oneOf": [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["accessibility"]}, + {"$ref": "#/definitions/accessibilityValidIfPresent"} + ] + }, + + "itemAccessibilityPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having accessibility key with qualifying body/target classes", + "description": "Supports implementation check of items having accessibility (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/accessibilityPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceAccessibilityPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having audience key", + "description": "Supports implementation check of audience (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["accessibility"] , + "$ref": "#/definitions/accessibilityValidIfPresent" + } + }, + "required": ["source"] + }, + + "rightsValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: rights value", + "description": "True when the annotation, body or target has 0 or more rights properties that are strings of format uri (Section 3.3.6)", + "type": "object", + "properties": {"rights": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri" } } + ] + } + } + }, + + "rightsPropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: rights key with qualifying annotation/body/target classes", + "description": "Supports implementation check of rights (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.6)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["rights"]}, + {"$ref": "#/definitions/rightsValidIfPresent"} + ] + }, + + "itemRightsPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having rights key with qualifying body/target classes", + "description": "Supports implementation check of items having rights (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/rightsPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceRightsPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having rights key", + "description": "Supports implementation check of rights (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["rights"] , + "$ref": "#/definitions/rightsValidIfPresent" + } + }, + "required": ["source"] + }, + + "canonicalValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: canonical value", + "description": "True when the annotation, body or target has 0 or 1 canonical properties that are strings of format uri (Section 3.3.7)", + "type": "object", + "properties": { + "canonical": { "$ref": "id.json#/definitions/arraySingleStringUri" } + } + }, + + "canonicalPropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: canonical key with qualifying annotation/body/target classes", + "description": "Supports implementation check of canonical (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.7)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["canonical"]}, + {"$ref": "#/definitions/canonicalValidIfPresent"} + ] + }, + + "itemCanonicalPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having canonical key with qualifying body/target classes", + "description": "Supports implementation check of items having canonical (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/canonicalPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceCanonicalPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having canonical key", + "description": "Supports implementation check of canonical (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["canonical"] , + "$ref": "#/definitions/canonicalValidIfPresent" + } + }, + "required": ["source"] + }, + + "viaValidIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: via value", + "description": "True when the annotation, body or target has 0 or more via properties that are strings of format uri (Section 3.3.7)", + "type": "object", + "properties": {"via": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "array", + "minItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri" } } + ] + } + } + }, + + "viaPropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: via key with qualifying annotation/body/target classes", + "description": "Supports implementation check of via (if/when) used on Annotation, External Web Resources, Specific Resources, Textual Body Resources (Sections 3.3.7)", + "oneOf": [ + {"$ref": "annotations.json#/definitions/annotationTypeValueFound"}, + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["via"]}, + {"$ref": "#/definitions/viaValidIfPresent"} + ] + }, + + "itemViaPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having via key with qualifying body/target classes", + "description": "Supports implementation check of items having via (if/when) used on External Web Resources, Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/viaPropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "sourceViaPropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: Specific Resource source having via key", + "description": "Supports implementation check of via (if/when) used on Specific Resource source (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "source": + { + "type": "object", + "required": ["via"] , + "$ref": "#/definitions/viaValidIfPresent" + } + }, + "required": ["source"] + }, + + "purposeRecognizedIfPresent": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Validation: purpose value", + "description": "True when the body has 0 or more purpose property values (Section 3.3.5)", + "type": "object", + "properties": {"purpose": + { "oneOf": [ + { "$ref": "annotations.json#/definitions/motivationList" }, + { "type": "array", + "minItems": 1, + "items": { "$ref": "annotations.json#/definitions/motivationList" } } + ] + } + } + }, + + "purposePropertyFound": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: purpose key with qualifying body classes", + "description": "Supports implementation check of purpose (if/when) used on Specific Resource Body or Textual Body (Sections 3.3.5)", + "oneOf": [ + {"$ref": "specificResource.json#/definitions/specificeResourceDetected"}, + {"$ref": "bodyTarget.json#/definitions/textualBodyFound"} + ], + "allOf": [ + {"required": ["purpose"]}, + {"$ref": "#/definitions/purposeRecognizedIfPresent"} + ] + }, + + "itemPurposePropertyFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having purpose key with qualifying body/target classes", + "description": "Supports implementation check of items having purpose (if/when) used on Specific Resources, Textual Body Resources (Sections 3.2.1-6, 3.3)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/purposePropertyFound" } } + } + } + }, + "required": ["items"] + }, + + "creatorAgentWithIdFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "id.json#/definitions/idValueFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "id.json#/definitions/idValueFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithIdFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithIdFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithIdFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithIdFound" } } + } + } + }, + "required": ["items"] + }, + + "agentTypeDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent type value", + "description": "True when the object (creator or generator agent) has no type or has at least one recognized Agent type value (Section 3.3.2)", + "type": "object", + "properties": + { + "type": + { + "oneOf": + [ + {"type": "string", + "enum": ["Person", "Organization", "Software"] }, + {"type": "array", + "minItems": 1, + "not": + { + "items" : + { "not": + { "type": "string", + "enum": ["Person", "Organization", "Software"] } + } + } + } + ] + } + } + }, + + "agentTypeFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent type value", + "description": "True when the object (creator or generator agent) has at least one recognized Agent type value (Section 3.3.2)", + "allOf": [ + {"required": ["type"]}, + {"$ref": "#/definitions/agentTypeDefinition"} + ] + }, + + "creatorAgentWithTypeFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentTypeFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentTypeFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithTypeFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithTypeFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithTypeFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithTypeFound" } } + } + } + }, + "required": ["items"] + }, + + "agentNameDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent name value", + "description": "True when the object (creator or generator agent) has no name or has Agent name(s) of type string (Section 3.3.2)", + "type": "object", + "properties": + { + "name": + { + "oneOf": + [ + {"type": "string" }, + {"type": "array", + "minItems": 1, + "items": {"type": "string"} + } + ] + } + } + }, + + "agentSingularNameDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent name value", + "description": "True when the object (creator or generator agent) has no name or has exactly one Agent name that is a string (Section 3.3.2)", + "type": "object", + "properties": + { + "name": + { + "oneOf": + [ + {"type": "string" }, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items": {"type": "string"} + } + ] + } + } + }, + + "agentNameFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent name value", + "description": "True when the object (creator or generator agent) has Agent name value(s) (Section 3.3.2)", + "allOf": [ + {"required": ["name"]}, + {"$ref": "#/definitions/agentNameDefinition"} + ] + }, + + "creatorAgentWithNameFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentNameFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithNameFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithNameFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithNameFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithNameFound" } } + } + } + }, + "required": ["items"] + }, + + "agentSingularNameFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent name value", + "description": "True when the object (creator or generator agent) has exactly one Agent name value (Section 3.3.2)", + "allOf": [ + {"required": ["name"]}, + {"$ref": "#/definitions/agentSingularNameDefinition"} + ] + }, + + "creatorAgentWithSingularNameFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentSingularNameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentSingularNameFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithSingularNameFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithSingularNameFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithSingularNameFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithSingularNameFound" } } + } + } + }, + "required": ["items"] + }, + + "agentSingularNicknameDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent nickname value", + "description": "True when the object (creator or generator agent) has no nickname or has exacly one Agent nickname that is a string (Section 3.3.2)", + "type": "object", + "properties": + { + "nickname": + { + "oneOf": + [ + {"type": "string" }, + {"type": "array", + "minItems": 1, + "maxItems": 1, + "items": {"type": "string"} + } + ] + } + } + }, + + "agentSingularNicknameFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent nickname value", + "description": "True when the object (creator or generator agent) has an Agent nickname value (Section 3.3.2)", + "allOf": [ + {"required": ["nickname"]}, + {"$ref": "#/definitions/agentSingularNicknameDefinition"} + ] + }, + + "creatorAgentWithSingularNicknameFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentSingularNicknameFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentSingularNicknameFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithSingularNicknameFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithSingularNicknameFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithSingularNicknameFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithSingularNicknameFound" } } + } + } + }, + "required": ["items"] + }, + + "agentEmailDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent email value", + "description": "True when the object (creator or generator agent) has no email or has Agent one or more email addresses that start(s) mailto: and is format uri (Section 3.3.2)", + "type": "object", + "properties": + { + "email": + { + "oneOf": + [ + { "type": "string", + "pattern": "^(mailto)", + "format": "uri" }, + {"type": "array", + "minItems": 1, + "items": {"type": "string", + "pattern": "^(mailto)", + "format": "uri" } + } + ] + } + } + }, + + "agentEmailFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent email value", + "description": "True when the object (creator or generator agent) has Agent email value(s) (Section 3.3.2)", + "allOf": [ + {"required": ["email"]}, + {"$ref": "#/definitions/agentEmailDefinition"} + ] + }, + + "creatorAgentWithEmailFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentEmailFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentEmailFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithEmailFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithEmailFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithEmailFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithEmailFound" } } + } + } + }, + "required": ["items"] + }, + + "agentEmail_sha1Definition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent email_sha1 value", + "description": "True when the object (creator or generator agent) has no email_sha1 or has one or more email_sha1 that is/are a string (Section 3.3.2)", + "type": "object", + "properties": + { + "email_sha1": + { + "oneOf": + [ + {"type": "string" }, + {"type": "array", + "minItems": 1, + "items": {"type": "string"} + } + ] + } + } + }, + + "agentEmail_sha1Found": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent email_sha1 value", + "description": "True when the object (creator or generator agent) has has one or more email_sha1 that is/are a string (Section 3.3.2)", + "allOf": [ + {"required": ["email_sha1"]}, + {"$ref": "#/definitions/agentEmail_sha1Definition"} + ] + }, + + "creatorAgentWithEmail_sha1Found": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentEmail_sha1Found" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentEmail_sha1Found" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithEmail_sha1Found": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithEmail_sha1Found" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithEmail_sha1Found": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithEmail_sha1Found" } } + } + } + }, + "required": ["items"] + }, + + "agentHomepageDefinition": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: Agent homepage value", + "description": "True when the object (creator or generator agent) has no homempage or has one or more agent homepage addresses of format uri (Section 3.3.2)", + "type": "object", + "properties": + { + "email": + { + "oneOf": + [ + { "type": "string", + "format": "uri" }, + {"type": "array", + "minItems": 1, + "items": {"type": "string", + "format": "uri" } + } + ] + } + } + }, + + "agentHomepageFound": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Check for implementation of Agent homepage value", + "description": "True when the object (creator or generator agent) has Agent homepage value(s) (Section 3.3.2)", + "allOf": [ + {"required": ["homepage"]}, + {"$ref": "#/definitions/agentHomepageDefinition"} + ] + }, + + "creatorAgentWithHomepageFound": + { "type": "object", + "properties": + { "creator": + { "oneOf": + [ + { "$ref": "#/definitions/agentHomepageFound" }, + { "type": "array", + "minItems": 1, + "not": + { "items": { "not": { "$ref": "#/definitions/agentHomepageFound" } } } + } + ] + } + }, + "required": ["creator"] + }, + + "sourceCreatorAgentWithHomepageFound": + { "type": "object", + "properties": + { + "source": + { "$ref": "#/definitions/creatorAgentWithHomepageFound" } + }, + "required": ["source"] + }, + + "itemCreatorAgentWithHomepageFound": + { + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/creatorAgentWithHomepageFound" } } + } + } + }, + "required": ["items"] + } + + } +} diff --git a/testing/web-platform/tests/annotation-model/definitions/specificResource.json b/testing/web-platform/tests/annotation-model/definitions/specificResource.json new file mode 100644 index 0000000000..b830f68bd2 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/definitions/specificResource.json @@ -0,0 +1,1128 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id" : "specificResource.json", + "title": "Definitions: Specific Resources.", + "description": "Schemas in #/definitions detect or validate keys/objects used in describing Specific Resources (Section 4).", + "definitions": { + + "sourceDetected": + { + "title": "Detection: source", + "description": "True when object has exactly 1 source key value and that value is of format uri or an External Web Resource (Section 4) - NB, the Specific Resource is closer in hierarchy to the External Web Resource than a Choice or Set; the items of a Choice or Set may be Specific Resources, but the source of a Specific Resource may not be a Choice or Set.", + "type": "object", + "properties": + { + "source": + { + "type": ["string", "object" ], + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "bodyTarget.json#/definitions/externalWebResourceDetected"} + ] + } + }, + "required": ["source"] + }, + + "specificeResourceDetected": + { + "title": "Detection: Specific Resource", + "description": "True when object has exactly 1 source value and at least one of purpose, selector, state, styleClass, renderedVia, scope (Section 4)", + "type": "object", + "$ref": "#/definitions/sourceDetected", + "anyOf": [ + { "$ref": "otherProperties.json#/definitions/purposeRecognizedIfPresent", "required": ["purpose"] }, + { "$ref": "#/definitions/selectorDetected" }, + { "$ref": "#/definitions/stateDetected" }, + { "$ref": "#/definitions/styleClassDetected" }, + { "$ref": "#/definitions/renderedViaDetected" }, + { "$ref": "#/definitions/scopeDetected" } + ] + }, + + "itemSpecificResourceDetected": + { + "title": "Detection: Specific Resource as item member of a Choice or Set", + "description": "True when object has items array containing an object with exactly 1 source value and at least one of purpose, selector, state, styleClass, renderedVia, scope (Section 4)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/specificeResourceDetected" } } + } + } + }, + "required": ["items"] + }, + + "selectorDefined": + { + "title": "Definition: selector", + "description": "True when object tested has no selector, or has selector identified by uri, or has selector(s) with value matching one or more of the selectors described in the model (Section 4.2)", + "type": "object", + "properties": + { + "selector": + { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/fragmentSelectorDetected"}, + {"$ref": "#/definitions/cssSelectorDetected"}, + {"$ref": "#/definitions/xpathSelectorDetected"}, + {"$ref": "#/definitions/textQuoteSelectorDetected"}, + {"$ref": "#/definitions/textPositionSelectorDetected"}, + {"$ref": "#/definitions/dataPositionSelectorDetected"}, + {"$ref": "#/definitions/rangeSelectorDetected"}, + {"$ref": "#/definitions/svgSelectorDetected"} + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/fragmentSelectorDetected"}, + {"$ref": "#/definitions/cssSelectorDetected"}, + {"$ref": "#/definitions/xpathSelectorDetected"}, + {"$ref": "#/definitions/textQuoteSelectorDetected"}, + {"$ref": "#/definitions/textPositionSelectorDetected"}, + {"$ref": "#/definitions/dataPositionSelectorDetected"}, + {"$ref": "#/definitions/rangeSelectorDetected"}, + {"$ref": "#/definitions/svgSelectorDetected"} + ] + } + ] + } + } + ] + } + } + }, + + "itemSelectorValidIfPresent": + { + "description": "True if ALL items in the items array of object tested have no selector, or have a selector that is uri, or have a selector that has recognized value(s)", + "type": "object", + "properties": + { + "items": + { "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/selectorDefined" } + ] + } + } + } + }, + + "selectorDetected": + { + "title": "Detection: selector type", + "description": "True when object tested has selector(s) that is(are) recognized as being one or more of the selectors described in the model (Section 4.2)", + "type": "object", + "$ref": "#/definitions/selectorDefined", + "required": ["selector"] + }, + + "fragmentSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["FragmentSelector"] } + }, + "required": ["type"] + }, + + "fragmentSelectorDetected": + { + "title": "Detection: fragment selector", + "description": "True when object is a fragment selelctor (Section 4.2.1)", + "allOf": + [ + { "$ref": "#/definitions/fragmentSelectorTypeDetected"}, + { + "type": "object", + "properties": + { + "value": { "type": "string" }, + "conformsTo": { "type": "string", "format": "uri"} + }, + "required": ["value"] + } + ] + }, + + "conformsToPropertyFound": + { + "title": "Detection: fragment selector with conformsTo key", + "description": "True when object is a fragment selelctor with a conformsTo key (Section 4.2.1)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/fragmentSelectorDetected"}, + { "required": ["conformsTo"] } + ] + }, + + "fragmentSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/fragmentSelectorTypeDetected" } }, + { "$ref": "#/definitions/fragmentSelectorDetected" } + ] + }, + + "cssSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["CssSelector"] } + }, + "required": ["type"] + }, + + "cssSelectorDetected": + { + "title": "Detection: CssSelector selector", + "description": "True when object is a CssSelector selelctor (Section 4.2.2)", + "allOf": + [ + { "$ref": "#/definitions/cssSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "value": { "type": "string" } + }, + "required": ["value"] + } + ] + }, + + "cssSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/cssSelectorTypeDetected" } }, + { "$ref": "#/definitions/cssSelectorDetected" } + ] + }, + + "xpathSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["XPathSelector"] } + }, + "required": ["type"] + }, + + "xpathSelectorDetected": + { + "title": "Detection: XPath selector", + "description": "True when object is a XPath selelctor (Section 4.2.3)", + "allOf": + [ + { "$ref": "#/definitions/xpathSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "value": { "type": "string" } + }, + "required": ["value"] + } + ] + + }, + + "xpathSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/xpathSelectorTypeDetected" } }, + { "$ref": "#/definitions/xpathSelectorDetected" } + ] + }, + + "textQuoteSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["TextQuoteSelector"] } + }, + "required": ["type"] + }, + + "textQuoteSelectorDetected": + { + "title": "Detection: text quote selector", + "description": "True when object is a text quote selelctor (Section 4.2.4)", + "allOf": + [ + { "$ref": "#/definitions/textQuoteSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "exact": { "type": "string" }, + "prefix": { "type": "string" }, + "suffix": { "type": "string" } + }, + "required": ["exact"] + } + ] + }, + + "prefixPropertyFound": + { + "title": "Detection: text quote selector with prefix key", + "description": "True when object is a text quote selelctor with a prefix key (Section 4.2.4)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/textQuoteSelectorDetected"}, + { "required": ["prefix"] } + ] + }, + + "suffixPropertyFound": + { + "title": "Detection: text quote selector with suffix key", + "description": "True when object is a text quote selelctor with a suffix key (Section 4.2.4)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/textQuoteSelectorDetected"}, + { "required": ["suffix"] } + ] + }, + + "textQuoteSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/textQuoteSelectorTypeDetected" } }, + { "$ref": "#/definitions/textQuoteSelectorDetected" } + ] + }, + + "textPositionSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["TextPositionSelector"] } + }, + "required": ["type"] + }, + + "textPositionSelectorDetected": + { + "title": "Definition: text position selector", + "description": "True when object is a text position selelctor (Section 4.2.5)", + "allOf": + [ + { "$ref": "#/definitions/textPositionSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "start": { "type": "integer", "minimum": 0 }, + "end": { "type": "integer","minimum": 0 } + }, + "required": ["start", "end"] + } + ] + }, + + "textPositionSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/textPositionSelectorTypeDetected" } }, + { "$ref": "#/definitions/textPositionSelectorDetected" } + ] + }, + + "dataPositionSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["DataPositionSelector"] } + }, + "required": ["type"] + }, + + "dataPositionSelectorDetected": + { + "title": "Definition: data position selector", + "description": "True when object is a data position selelctor (Section 4.2.5)", + "allOf": + [ + { "$ref": "#/definitions/dataPositionSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "start": { "type": "integer", "minimum": 0 }, + "end": { "type": "integer","minimum": 0 } + }, + "required": ["start", "end"] + } + ] + }, + + "dataPositionSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/dataPositionSelectorTypeDetected" } }, + { "$ref": "#/definitions/dataPositionSelectorDetected" } + ] + }, + + "svgSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["SvgSelector"] } + }, + "required": ["type"] + }, + + "svgSelectorDetected": + { + "title": "Detection: svg selector", + "description": "True when object is a svg selelctor (Section 4.2.7)", + "allOf": + [ + { "$ref": "#/definitions/svgSelectorTypeDetected" }, + { + "type": "object", + "properties": + { + "value": { "type": "string" }, + "id": { "$ref": "id.json#/definitions/arraySingleStringUri" } + }, + "oneOf": [ + {"required": ["value"] }, + {"required": ["id"] } + ] + } + ] + }, + + "svgSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/svgSelectorTypeDetected" } }, + { "$ref": "#/definitions/svgSelectorDetected" } + ] + }, + + "rangeSelectorTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["RangeSelector"] } + }, + "required": ["type"] + }, + + "rangeSelectorDetected": + { + "title": "Detection: range selector", + "description": "True when object is a range selelctor (Section 4.2.9)", + "allOf": + [ + { "$ref": "#/definitions/rangeSelectorTypeDetected" }, + { + "type": "object", + "patternProperties": + { + "^(startSelector|endSelector)$": + { "type": "object", + "oneOf": [ + {"$ref": "#/definitions/fragmentSelectorDetected"}, + {"$ref": "#/definitions/cssSelectorDetected"}, + {"$ref": "#/definitions/xpathSelectorDetected"}, + {"$ref": "#/definitions/textQuoteSelectorDetected"}, + {"$ref": "#/definitions/textPositionSelectorDetected"}, + {"$ref": "#/definitions/dataPositionSelectorDetected"}, + {"$ref": "#/definitions/svgSelectorDetected"} + ] + } + }, + "required": ["startSelector", "endSelector"] + } + ] + }, + + "rangeSelectorTypeValidIfPresent": + { + "description": "True if Selector Type not detected (i.e., not present), or if both Type and Selector detected (i.e., Selector constraints met); note, Selector cannot be detected if Selector Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/rangeSelectorTypeDetected" } }, + { "$ref": "#/definitions/rangeSelectorDetected" } + ] + }, + + "stateDefined" : + { + "title": "Definition: state", + "description": "True when object tested has state with value matching one or more of the state classes described in the model (Section 4.3)", + "type": "object", + "properties": + { + "state": + { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/timeStateDetected"}, + {"$ref": "#/definitions/requestHeaderStateDetected"} + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/timeStateDetected"}, + {"$ref": "#/definitions/requestHeaderStateDetected"} + ] + } + ] + } + } + ] + } + } + }, + + "itemStateValidIfPresent": + { + "description": "True if ALL items in the items array of object tested have no state, or have a state that is uri, or have a state that has recognized value(s)", + "type": "object", + "properties": + { + "items": + { "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/stateDefined" } + ] + } + } + } + }, + + "stateDetected": + { + "title": "Detection: state type", + "description": "True when object tested has state(s) that is(are) recognized as being one or more of the states described in the model (Section 4.3)", + "type": "object", + "$ref": "#/definitions/stateDefined", + "required": ["state"] + }, + + "timeStateTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["TimeState"] } + }, + "required": ["type"] + }, + + "timeStateDetected": + { + "title": "Detection: time state", + "description": "True when object is a time state (Section 4.3.1)", + "allOf": + [ + { "$ref": "#/definitions/timeStateTypeDetected" }, + { + "type": "object", + "properties": + { + "sourceDate": + { "oneOf": [ + { "type": "string", + "format": "date-time"}, + { "type": "array", + "minItems": 1, + "items": + {"type": "string", "format": "date-time"} + } + ] + }, + "sourceDateStart": { "type": "string", "format": "date-time"}, + "sourceDateEnd": { "type": "string", "format": "date-time"}, + "cached": { "type": "string", "format": "uri"} + }, + "oneOf": + [ + { "required": ["sourceDate"] }, + { "required": ["sourceDateStart", "sourceDateEnd"] } + ], + "not": + { "required": [ "sourceDate", "sourceDateStart", "sourceDateEnd" ] } + } + ] + }, + + "cachedPropertyFound": + { + "title": "Detection: time state with cached key", + "description": "True when object is a time state with a cached key (Section 4.3.1)", + "type": "object", + "allOf": + [ + { "$ref": "#/definitions/timeStateDetected"}, + { "required": ["cached"] } + ] + }, + + "timeStateTypeValidIfPresent": + { + "description": "True if State Type not detected (i.e., not present), or if both Type and State detected (i.e., State constraints met); note, State cannot be detected if State Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/timeStateTypeDetected" } }, + { "$ref": "#/definitions/timeStateDetected" } + ] + }, + + "requestHeaderStateTypeDetected": + { + "type": "object", + "properties": + { + "type": { "type": "string", "enum": ["HttpRequestState"] } + }, + "required": ["type"] + }, + + "requestHeaderStateDetected": + { + "title": "Detection: request header state", + "description": "True when object is a request header state (Section 4.3.2)", + "allOf": + [ + { "$ref": "#/definitions/requestHeaderStateTypeDetected" }, + { + "type": "object", + "properties": + { + "value": { "type": "string"} + }, + "required": ["value"] + } + ] + }, + + "requestHeaderStateTypeValidIfPresent": + { + "description": "True if State Type not detected (i.e., not present), or if both Type and State detected (i.e., State constraints met); note, State cannot be detected if State Type not detected.", + "oneOf": + [ + { "not": { "$ref": "#/definitions/requestHeaderStateTypeDetected" } }, + { "$ref": "#/definitions/requestHeaderStateDetected" } + ] + }, + + "refinedByDefined": + { + "title": "Definition: refinedBy", + "description": "True when object tested has no refinedBy, or has refinedBy identified by uri, or has refinedBy(s) with value matching one or more of the refinedBys described in the model (Section 4.2)", + "type": "object", + "properties": + { + "refinedBy": + { + "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/fragmentSelectorDetected"}, + {"$ref": "#/definitions/cssSelectorDetected"}, + {"$ref": "#/definitions/xpathSelectorDetected"}, + {"$ref": "#/definitions/textQuoteSelectorDetected"}, + {"$ref": "#/definitions/textPositionSelectorDetected"}, + {"$ref": "#/definitions/dataPositionSelectorDetected"}, + {"$ref": "#/definitions/rangeSelectorDetected"}, + {"$ref": "#/definitions/svgSelectorDetected"}, + {"$ref": "#/definitions/timeStateDetected"}, + {"$ref": "#/definitions/requestHeaderStateDetected"} + ] + }, + { + "type": "array", + "minItems": 1, + "items": + { "oneOf": [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "anyOf": [ + {"$ref": "id.json#/definitions/idValueFound"}, + {"$ref": "#/definitions/fragmentSelectorDetected"}, + {"$ref": "#/definitions/cssSelectorDetected"}, + {"$ref": "#/definitions/xpathSelectorDetected"}, + {"$ref": "#/definitions/textQuoteSelectorDetected"}, + {"$ref": "#/definitions/textPositionSelectorDetected"}, + {"$ref": "#/definitions/dataPositionSelectorDetected"}, + {"$ref": "#/definitions/rangeSelectorDetected"}, + {"$ref": "#/definitions/svgSelectorDetected"}, + {"$ref": "#/definitions/timeStateDetected"}, + {"$ref": "#/definitions/requestHeaderStateDetected"} + ] + } + ] + } + } + ] + } + } + }, + + "checkForRefinedBy": + { + "description": "True if no state or selector, if no refinedBy, or if correct refinedBy", + "type": "object", + "patternProperties": + { + "^(state|selector)$": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "$ref": "#/definitions/refinedByDefined" }, + { "type": "array", + "minItems": 1, + "items": + {"oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "type": "object", + "$ref": "#/definitions/refinedByDefined" } + ] + } + } + ] + } + } + }, + + "itemRefinedByValidIfPresent": + { + "description": "True if items in the items array of object tested have no refinedBy, or have a refinedBy that is uri, or have a refinedBy that has recognized value(s)", + "type": "object", + "properties": + { + "items": + { "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri" }, + { "$ref": "#/definitions/checkForRefinedBy" } + ] + } + } + } + }, + + "refinedByDetected": + { + "title": "Detection: refinedBy ", + "description": "True when object tested has selector or state that has refinedBy(s) that is(are) recognized as being one or more of the refinedBys described in the model (Section 4.2)", + "type": "object", + "anyOf": + [ + { "properties": + { "state" : { "$ref ": "#/definitions/refinedByWithinStateSelector" } }, + "required": ["state"] + }, + { "properties": + { "selector" : { "$ref ": "#/definitions/refinedByWithinStateSelector" } }, + "required": ["selector"] + } + ] + }, + + "refinedByWithinStateSelector": + { + "oneOf": + [ + { "type": "object", + "$ref": "#/definitions/refinedByDefined", + "required": ["refinedBy"] + }, + { "type": "array", + "minItems": 1, + "not": + { + "items": + {"not": + { "type": "object", + "$ref": "#/definitions/refinedByDefined", + "required": ["refinedBy"] + } + } + } + } + ] + }, + + "styleClassDefinition": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: styleClass property value", + "description": "True when the object has no styleClass property or has a styleClass property that appears with source and that is a string value or array of string values (Section 4.4)", + "properties": + { + "styleClass": + { + "oneOf": + [ + { "type": "string" }, + { "type": "array", + "minItems": 1, + "items": { "type": "string" } } + ] + } + }, + "dependencies": + { + "styleClass": ["source"] + } + }, + + "styleClassDetected": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: styleClass key with qualifying body/target classes", + "description": "Supports implementation check of styleClass (if/when) used on Specific Resources (Sections 4.4)", + "type": "object", + "allOf": [ + { "$ref": "#/definitions/styleClassDefinition" }, + { "required": ["styleClass"] } + ] + }, + + "itemStyleClassPropertyDetected": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having styleClass key with qualifying body/target classes", + "description": "Supports implementation check of items having styleClass (if/when) used on Specific Resources (Sections 4.4)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/styleClassDetected" } } + } + } + }, + "required": ["items"] + }, + + "renderedViaDefinition": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: renderedVia property value", + "description": "True when the body/target has no renderedVia property or has a valid renderedVia property (Section 4.5)", + "type": "object", + "properties": { + "renderedVia": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri"}, + { "$ref": "id.json#/definitions/idValueFound"}, + { "type": "array", + "minItems": 1, + "items": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri"}, + { "$ref": "id.json#/definitions/idValueFound"} + ] + } + } + ] + } + } + }, + + "renderedViaDetected": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: renderedVia key with qualifying body/target classes", + "description": "Supports implementation check of renderedVia (if/when) used on Specific Resources (Sections 4.4)", + "allOf": [ + { "$ref": "#/definitions/sourceDetected" }, + { "required": ["renderedVia"] }, + { "$ref": "#/definitions/renderedViaDefinition" } + ] + }, + + "itemRenderedViaPropertyDetected": + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: items having renderedVia key with qualifying body/target classes", + "description": "Supports implementation check of items having renderedVia (if/when) used on Specific Resources (Sections 4.4)", + "type": "object", + "properties": + { + "items": + { + "type": "array", + "minItems": 1, + "not": + { + "items": + { "not": { "$ref": "#/definitions/renderedViaDetected" } } + } + } + }, + "required": ["items"] + }, + + "scopeDefinition": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Definition: scope property value", + "description": "True when the body/target has no scope property or has a valid scope property (Section 4.6)", + "type": "object", + "properties": { + "scope": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/stringUri"}, + { "type": "array", + "minItems": 1, + "items": { "$ref": "id.json#/definitions/stringUri"} + } + ] + } + } + }, + + "scopeDetected": + { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Collate: scope key with qualifying body/target classes", + "description": "Supports implementation check of scope (if/when) used on Specific Resource Body (Sections 4.6)", + "allOf": [ + {"required": ["scope"]}, + {"$ref": "#/definitions/scopeDefinition"} + ] + }, + + "sourceWithCreated": + { + "description": "True if no source, or source is uri, or source is object that does not have created key, or if source is object that has only 1 created key of date-time format", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "otherProperties.json#/definitions/createdValidIfPresent" } + ] + } + } + }, + + "sourceWithModified": + { + "description": "True if no source, or source is uri, or source is object that does not have modified key, or if source is object that has only 1 modified key of date-time format", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "otherProperties.json#/definitions/modifiedValidIfPresent" } + ] + } + } + }, + + "sourceWithRights": + { + "description": "True if no source, or source is uri, or source is object that does not have rights key, or if source is object that has rights key with all values of uri format", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "otherProperties.json#/definitions/rightsValidIfPresent" } + ] + } + } + }, + + "sourceWithCanonical": + { + "description": "True if no source, or source is uri, or source is object that does not have canonical key, or if source is object that has only 1 canonical key of uri format", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "otherProperties.json#/definitions/canonicalValidIfPresent" } + ] + } + } + }, + + "sourceWithVia": + { + "description": "True if no source, or source is uri, or source is object that does not have via key, or if source is object that has via key with all values of uri format", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "otherProperties.json#/definitions/viaValidIfPresent" } + ] + } + } + }, + + "sourceWithTextDirection": + { + "description": "True if no source, or source is uri, or source is object that does not have textDirection key, or if source is object that has only 1 textDirectoin key, one of ltr, rtl, auto", + "type": "object", + "properties": + { + "source": + { + "oneOf": + [ + { "$ref": "id.json#/definitions/arraySingleStringUri" }, + { "$ref": "bodyTarget.json#/definitions/textDirectionValidIfPresent" } + ] + } + } + }, + + "specificResourceWithItems" : + { + "description": "True if both source and items keys are present.", + "allOf": + [ + { "$ref": "#/definitions/sourceDetected"}, + { "required": [ "items" ] } + ] + }, + + "itemSRWithItems": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/specificResourceWithItems" } } } + } + }, + "required": ["items"] + }, + + "specificResourceWithValue" : + { + "description": "True if both source and value keys are present.", + "allOf": + [ + { "$ref": "#/definitions/sourceDetected"}, + { "required": [ "value" ] } + ] + }, + + "itemSRWithValue": + { + "type": "object", + "properties": + { + "items": { + "type": "array", + "minItems": 1, + "not": + { "items": {"not": { "$ref": "#/definitions/specificResourceWithValue" } } } + } + }, + "required": ["items"] + } + + } +}
\ No newline at end of file |