diff --git a/Makefile b/Makefile index 51633cad..608cde6e 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,12 @@ TIME ?= time include generated.mk all: common test node_modules - $(NODE) $(JSONSCHEMA) fmt schemas rules test + $(NODE) $(JSONSCHEMA) fmt schemas examples rules test .PHONY: common common: $(GENERATED) node_modules - $(TIME) $(NODE) $(JSONSCHEMA) metaschema schemas rules - $(TIME) $(NODE) $(JSONSCHEMA) lint schemas + $(TIME) $(NODE) $(JSONSCHEMA) metaschema schemas examples rules + $(TIME) $(NODE) $(JSONSCHEMA) lint schemas examples $(SHELLCHECK) scripts/*.sh ./scripts/quality-schemas-tests-mirror.sh JQ="$(JQ)" ./scripts/quality-templates-xbrl-utr-mirror.sh @@ -22,7 +22,7 @@ common: $(GENERATED) node_modules .PHONY: lint lint: common node_modules - $(TIME) $(NODE) $(JSONSCHEMA) fmt schemas rules test --check + $(TIME) $(NODE) $(JSONSCHEMA) fmt schemas examples rules test --check .PHONY: test test: common node_modules diff --git a/examples/athlete-profile.json b/examples/athlete-profile.json new file mode 100644 index 00000000..f9ec4045 --- /dev/null +++ b/examples/athlete-profile.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Athlete Profile", + "description": "A sports roster entry that describes an athlete as a Schema.org person, combining identity, physical measurements, and spoken languages from the standard library", + "examples": [ + { + "name": "Lionel Messi", + "birthDate": "1987-06-24", + "nationality": "AR", + "height": 1.7, + "weight": 72, + "languages": [ "es" ] + } + ], + "x-jsonld-type": "https://schema.org/Person", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://schema.org/Person" ], + "type": "object", + "required": [ "name", "nationality" ], + "properties": { + "name": { + "x-jsonld-id": "https://schema.org/name", + "type": "string" + }, + "birthDate": { + "x-jsonld-id": "https://schema.org/birthDate", + "$ref": "../schemas/iso/datetime/2019/date/calendar-extended/v1.json" + }, + "nationality": { + "x-jsonld-id": "https://schema.org/nationality", + "$ref": "../schemas/iso/country/2020/alpha-2/v1.json" + }, + "height": { + "x-jsonld-id": "https://schema.org/height", + "$ref": "../schemas/bipm/si/2019/base/unit/metre/v1.json" + }, + "weight": { + "x-jsonld-id": "https://schema.org/weight", + "$ref": "../schemas/bipm/si/2019/base/unit/kilogram/v1.json" + }, + "languages": { + "x-jsonld-container": "@set", + "x-jsonld-id": "https://schema.org/knowsLanguage", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "../schemas/iso/language/2023/set-1/v1.json" + } + } + }, + "additionalProperties": false +} diff --git a/examples/dataset-catalog.json b/examples/dataset-catalog.json new file mode 100644 index 00000000..e607a50d --- /dev/null +++ b/examples/dataset-catalog.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dataset Catalog Entry", + "description": "A DCAT dataset description whose containing catalog is declared through a reverse membership relation and whose provenance is grouped in a named graph, built on the standard library", + "examples": [ + { + "title": "Buenos Aires Air Quality Measurements", + "landingPage": "https://data.example.com/air-quality", + "catalog": { + "title": "City of Buenos Aires Open Data" + }, + "provenance": { + "creator": "Environmental Protection Agency", + "created": "2024-11-02" + } + } + ], + "x-jsonld-type": "http://www.w3.org/ns/dcat#Dataset", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.w3.org/TR/vocab-dcat-3/" ], + "type": "object", + "required": [ "title" ], + "properties": { + "title": { + "x-jsonld-id": "http://purl.org/dc/terms/title", + "type": "string" + }, + "landingPage": { + "x-jsonld-id": "http://www.w3.org/ns/dcat#landingPage", + "$ref": "../schemas/ietf/uri/3986/uri/v1.json" + }, + "catalog": { + "x-jsonld-reverse": "http://www.w3.org/ns/dcat#dataset", + "x-jsonld-type": "http://www.w3.org/ns/dcat#Catalog", + "type": "object", + "properties": { + "title": { + "x-jsonld-id": "http://purl.org/dc/terms/title", + "type": "string" + } + }, + "additionalProperties": false + }, + "provenance": { + "x-jsonld-graph": true, + "x-jsonld-id": "http://purl.org/dc/terms/provenance", + "type": "object", + "properties": { + "creator": { + "x-jsonld-id": "http://purl.org/dc/terms/creator", + "type": "string" + }, + "created": { + "x-jsonld-id": "http://purl.org/dc/terms/created", + "$ref": "../schemas/iso/datetime/2019/date/calendar-extended/v1.json" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} diff --git a/examples/legacy-inventory.json b/examples/legacy-inventory.json new file mode 100644 index 00000000..f9830af8 --- /dev/null +++ b/examples/legacy-inventory.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Legacy Inventory Item", + "description": "A warehouse inventory record for a system with a pre-existing internal ontology, which adopts standard library atoms for validation while overriding their linked data mappings to keep its own identifiers", + "examples": [ + { + "sku": "WH-4821-B", + "currency": "USD", + "unitPrice": 12.5, + "originCountry": "CN", + "attributes": { + "shelf": "B4", + "fragile": false, + "batch": null + } + } + ], + "x-jsonld-type": "https://inventory.example.com/vocab#Item", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.w3.org/TR/json-ld11/" ], + "type": "object", + "required": [ "sku", "currency", "unitPrice" ], + "properties": { + "sku": { + "x-jsonld-id": "https://inventory.example.com/vocab#sku", + "type": "string" + }, + "currency": { + "x-jsonld-id": "https://inventory.example.com/vocab#currency", + "x-jsonld-override": true, + "x-jsonld-self": null, + "$ref": "../schemas/iso/currency/2015/alpha-currency/v1.json" + }, + "unitPrice": { + "x-jsonld-id": "https://inventory.example.com/vocab#unitPrice", + "type": "number", + "minimum": 0 + }, + "originCountry": { + "x-jsonld-id": "https://inventory.example.com/vocab#originCountry", + "$ref": "../schemas/iso/country/2020/alpha-2/v1.json" + }, + "attributes": { + "x-jsonld-id": "https://inventory.example.com/vocab#attributes", + "x-jsonld-json": true, + "type": "object" + } + }, + "additionalProperties": false +} diff --git a/examples/product-listing.json b/examples/product-listing.json new file mode 100644 index 00000000..7bf0ed9a --- /dev/null +++ b/examples/product-listing.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product Listing", + "description": "An e-commerce catalog entry that describes a physical product as a Schema.org product, with multilingual names, a price in a standard currency, and shipping measurements from the standard library", + "examples": [ + { + "name": { + "en": "Wireless Mouse", + "fr": "Souris sans fil" + }, + "price": 29.99, + "priceCurrency": "EUR", + "weight": 0.085, + "countryOfOrigin": "DE" + } + ], + "x-jsonld-type": "https://schema.org/Product", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://schema.org/Product" ], + "type": "object", + "required": [ "name", "price", "priceCurrency" ], + "properties": { + "name": { + "x-jsonld-container": "@language", + "x-jsonld-id": "https://schema.org/name", + "type": "object", + "minProperties": 1, + "propertyNames": { + "$ref": "../schemas/ietf/language/5646/tag-syntax/v1.json" + }, + "additionalProperties": { + "type": "string" + } + }, + "price": { + "x-jsonld-id": "https://schema.org/price", + "type": "number", + "minimum": 0 + }, + "priceCurrency": { + "x-jsonld-id": "https://schema.org/priceCurrency", + "$ref": "../schemas/iso/currency/2015/alpha-currency/v1.json" + }, + "weight": { + "x-jsonld-id": "https://schema.org/weight", + "$ref": "../schemas/bipm/si/2019/base/unit/kilogram/v1.json" + }, + "countryOfOrigin": { + "x-jsonld-id": "https://schema.org/countryOfOrigin", + "$ref": "../schemas/iso/country/2020/alpha-2/v1.json" + } + }, + "additionalProperties": false +} diff --git a/examples/publication-record.json b/examples/publication-record.json new file mode 100644 index 00000000..1a247281 --- /dev/null +++ b/examples/publication-record.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Publication Record", + "description": "A bibliographic catalog entry for an Arabic language publisher, with right to left titles, the language of the work, the publication date, and the license as linked data through the standard library", + "examples": [ + { + "title": "ألف ليلة وليلة", + "abstract": "مجموعة من القصص الشعبية من العصر الذهبي الإسلامي", + "language": "ara", + "issued": "2019-03-14", + "license": "https://creativecommons.org/licenses/by/4.0/" + } + ], + "x-jsonld-type": "http://purl.org/dc/terms/BibliographicResource", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.dublincore.org/specifications/dublin-core/dcmi-terms/" + ], + "type": "object", + "required": [ "title", "language" ], + "properties": { + "title": { + "x-jsonld-direction": "rtl", + "x-jsonld-id": "http://purl.org/dc/terms/title", + "x-jsonld-language": "ar", + "type": "string" + }, + "abstract": { + "x-jsonld-direction": "rtl", + "x-jsonld-id": "http://purl.org/dc/terms/abstract", + "x-jsonld-language": "ar", + "type": "string" + }, + "language": { + "x-jsonld-id": "http://purl.org/dc/terms/language", + "$ref": "../schemas/iso/language/2023/set-2-bibliographic/v1.json" + }, + "issued": { + "x-jsonld-id": "http://purl.org/dc/terms/issued", + "$ref": "../schemas/iso/datetime/2019/date/calendar-extended/v1.json" + }, + "license": { + "x-jsonld-id": "http://purl.org/dc/terms/license", + "$ref": "../schemas/ietf/uri/3986/uri/v1.json" + } + }, + "additionalProperties": false +} diff --git a/examples/sensor-reading.json b/examples/sensor-reading.json new file mode 100644 index 00000000..788353cf --- /dev/null +++ b/examples/sensor-reading.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sensor Reading", + "description": "An IoT telemetry observation modelled after the W3C SOSA ontology, with the measured quantity in a prefixed SI unit, the observed property as a dereferenceable IRI, and the sensor location as GeoJSON from the standard library", + "examples": [ + { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 743.2, + "resultTime": "2026-08-03T14:30:00Z", + "location": { + "type": "Point", + "coordinates": [ -58.3816, -34.6037 ] + } + } + ], + "x-jsonld-type": "http://www.w3.org/ns/sosa/Observation", + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ "https://www.w3.org/TR/vocab-ssn/" ], + "type": "object", + "required": [ "observedProperty", "result", "resultTime" ], + "properties": { + "observedProperty": { + "x-jsonld-id": "http://www.w3.org/ns/sosa/observedProperty", + "$ref": "../schemas/ietf/uri/3986/uri/v1.json" + }, + "result": { + "x-jsonld-id": "http://www.w3.org/ns/sosa/hasResult", + "$ref": "../schemas/bipm/si/2019/derived/prefixed/millivolt/v1.json" + }, + "resultTime": { + "x-jsonld-id": "http://www.w3.org/ns/sosa/resultTime", + "$ref": "../schemas/iso/datetime/2019/datetime/calendar-utc-extended/v1.json" + }, + "location": { + "x-jsonld-id": "https://schema.org/location", + "$ref": "../schemas/ietf/geojson/7946/point/v1.json" + } + }, + "additionalProperties": false +} diff --git a/schemas/iso/datetime/2019/datetime/calendar-basic/v1.json b/schemas/iso/datetime/2019/datetime/calendar-basic/v1.json index 9363fd73..b25cc58a 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day (Basic Format)", "description": "A representation of calendar date combined with complete local time of day in basic format [YYYY][MM][DD][\"T\"][hh][mm][ss] where the time designator \"T\" separates date from time (§5.4.2.1 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "19850412T232050", "20000101T000000", diff --git a/schemas/iso/datetime/2019/datetime/calendar-extended/v1.json b/schemas/iso/datetime/2019/datetime/calendar-extended/v1.json index b129cc46..2b20cadc 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day (Extended Format)", "description": "A representation of calendar date combined with complete local time of day in extended format [YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm][\":\"[ss] where the time designator \"T\" separates date from time (§5.4.2.1 b)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-04-12T23:20:50", "2000-01-01T00:00:00", diff --git a/schemas/iso/datetime/2019/datetime/calendar-minute-basic/v1.json b/schemas/iso/datetime/2019/datetime/calendar-minute-basic/v1.json index 4c3ca833..965a81dd 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-minute-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-minute-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Reduced Precision (Basic Format)", "description": "A representation of calendar date combined with reduced precision local time of day (hour and minute only) in basic format [YYYY][MM][DD][\"T\"][hh][mm] where seconds are omitted (§5.4.3 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "19850412T1015", "20000101T0000", diff --git a/schemas/iso/datetime/2019/datetime/calendar-minute-extended/v1.json b/schemas/iso/datetime/2019/datetime/calendar-minute-extended/v1.json index 5d407b7b..d13d5ebc 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-minute-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-minute-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Reduced Precision (Extended Format)", "description": "A representation of calendar date combined with reduced precision local time of day (hour and minute only) in extended format [YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm] where seconds are omitted (§5.4.3 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-04-12T10:15", "2000-01-01T00:00", diff --git a/schemas/iso/datetime/2019/datetime/calendar-shift-basic/v1.json b/schemas/iso/datetime/2019/datetime/calendar-shift-basic/v1.json index 80fb83df..cb043964 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-shift-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-shift-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Time Shift (Basic Format)", "description": "A representation of calendar date combined with complete local time of day and time shift from UTC in basic format [YYYY][MM][DD][\"T\"][hh][mm][ss][±][hh][mm] where the time shift includes hours and minutes (§5.4.2.1 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "19850412T232050+0400", "20000101T000000-0500", diff --git a/schemas/iso/datetime/2019/datetime/calendar-shift-extended/v1.json b/schemas/iso/datetime/2019/datetime/calendar-shift-extended/v1.json index b9529414..f0136511 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-shift-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-shift-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Time Shift (Extended Format)", "description": "A representation of calendar date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh][\":\"[mm] where the time shift includes hours and minutes (§5.4.2.1 b)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-04-12T23:20:50+04:00", "2000-01-01T00:00:00-05:00", diff --git a/schemas/iso/datetime/2019/datetime/calendar-shifthour-basic/v1.json b/schemas/iso/datetime/2019/datetime/calendar-shifthour-basic/v1.json index 483de39d..5c86f267 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-shifthour-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-shifthour-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Hourly Time Shift (Basic Format)", "description": "A representation of calendar date combined with complete local time of day and time shift from UTC in basic format [YYYY][MM][DD][\"T\"][hh][mm][ss][±][hh] where the time shift includes only hours (§5.4.2.1 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "19850412T232050+04", "20000101T000000-05", diff --git a/schemas/iso/datetime/2019/datetime/calendar-shifthour-extended/v1.json b/schemas/iso/datetime/2019/datetime/calendar-shifthour-extended/v1.json index 79bbd20c..3953d691 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-shifthour-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-shifthour-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and Local Time of Day with Hourly Time Shift (Extended Format)", "description": "A representation of calendar date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh] where the time shift includes only hours (§5.4.2.1 b)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-04-12T23:20:50+04", "2000-01-01T00:00:00-05", diff --git a/schemas/iso/datetime/2019/datetime/calendar-utc-basic/v1.json b/schemas/iso/datetime/2019/datetime/calendar-utc-basic/v1.json index fbc6b532..f3be226d 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-utc-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-utc-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and UTC of Day (Basic Format)", "description": "A representation of calendar date combined with complete UTC of day in basic format [YYYY][MM][DD][\"T\"][hh][mm][ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.1 a)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "19850412T232050Z", "20000101T000000Z", diff --git a/schemas/iso/datetime/2019/datetime/calendar-utc-extended/v1.json b/schemas/iso/datetime/2019/datetime/calendar-utc-extended/v1.json index 4dd98f83..88438cc8 100644 --- a/schemas/iso/datetime/2019/datetime/calendar-utc-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/calendar-utc-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Calendar Date and UTC of Day (Extended Format)", "description": "A representation of calendar date combined with complete UTC of day in extended format [YYYY][\"-\"][MM][\"-\"][DD][\"T\"][hh][\":\"[mm][\":\"[ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.1 b)", - "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer", + "$comment": "This schema validates day/month combinations (i.e rejects April 31) but does not validate leap years. February 29 is accepted for any year, and leap year validation must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-04-12T23:20:50Z", "2000-01-01T00:00:00Z", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-basic/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-basic/v1.json index 9043646b..f36b5118 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day (Basic Format)", "description": "A representation of ordinal date combined with complete local time of day in basic format [YYYY][DDD][\"T\"][hh][mm][ss] where the time designator \"T\" separates date from time (§5.4.2.2 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985102T232050", "2000001T000000", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-extended/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-extended/v1.json index 06d923a2..3311c6f9 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day (Extended Format)", "description": "A representation of ordinal date combined with complete local time of day in extended format [YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\":\"[ss] where the time designator \"T\" separates date from time (§5.4.2.2 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-102T23:20:50", "2000-001T00:00:00", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-basic/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-basic/v1.json index f443869f..1f342694 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and UTC of Day with Reduced Precision (Basic Format)", "description": "A representation of ordinal date combined with reduced precision UTC of day (hour and minute only) in basic format [YYYY][DDD][\"T\"][hh][mm][\"Z\"] where seconds are omitted (§5.4.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985102T1015Z", "2000001T0000Z", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-extended/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-extended/v1.json index fb7e8ed8..1298aecf 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-minute-utc-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and UTC of Day with Reduced Precision (Extended Format)", "description": "A representation of ordinal date combined with reduced precision UTC of day (hour and minute only) in extended format [YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\"Z\"] where seconds are omitted (§5.4.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-102T10:15Z", "2000-001T00:00Z", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-shift-basic/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-shift-basic/v1.json index 5bf3a38c..cb88b512 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-shift-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-shift-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day with Time Shift (Basic Format)", "description": "A representation of ordinal date combined with complete local time of day and time shift from UTC in basic format [YYYY][DDD][\"T\"][hh][mm][ss][±][hh][mm] where the time shift includes hours and minutes (§5.4.2.2 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985102T232050+0400", "2000001T000000-0500", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-shift-extended/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-shift-extended/v1.json index 07c20d9b..8d4fb3d2 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-shift-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-shift-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day with Time Shift (Extended Format)", "description": "A representation of ordinal date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh][\":\"[mm] where the time shift includes hours and minutes (§5.4.2.2 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-102T23:20:50+04:00", "2000-001T00:00:00-05:00", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-shifthour-basic/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-shifthour-basic/v1.json index 33a50df3..7319b7d1 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-shifthour-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-shifthour-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day with Hourly Time Shift (Basic Format)", "description": "A representation of ordinal date combined with complete local time of day and time shift from UTC in basic format [YYYY][DDD][\"T\"][hh][mm][ss][±][hh] where the time shift includes only hours (§5.4.2.2 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985102T232050+04", "2000001T000000-05", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-shifthour-extended/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-shifthour-extended/v1.json index 2aef71f0..2250da81 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-shifthour-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-shifthour-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and Local Time of Day with Hourly Time Shift (Extended Format)", "description": "A representation of ordinal date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh] where the time shift includes only hours (§5.4.2.2 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-102T23:20:50+04", "2000-001T00:00:00-05", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-utc-basic/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-utc-basic/v1.json index 9235d08a..1cf7a0b9 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-utc-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-utc-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and UTC of Day (Basic Format)", "description": "A representation of ordinal date combined with complete UTC of day in basic format [YYYY][DDD][\"T\"][hh][mm][ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.2 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985102T232050Z", "2000001T000000Z", diff --git a/schemas/iso/datetime/2019/datetime/ordinal-utc-extended/v1.json b/schemas/iso/datetime/2019/datetime/ordinal-utc-extended/v1.json index abe82394..e5caa9cd 100644 --- a/schemas/iso/datetime/2019/datetime/ordinal-utc-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/ordinal-utc-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Ordinal Date and UTC of Day (Extended Format)", "description": "A representation of ordinal date combined with complete UTC of day in extended format [YYYY][\"-\"][DDD][\"T\"][hh][\":\"[mm][\":\"[ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.2 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-102T23:20:50Z", "2000-001T00:00:00Z", diff --git a/schemas/iso/datetime/2019/datetime/week-basic/v1.json b/schemas/iso/datetime/2019/datetime/week-basic/v1.json index 2c7b8fa9..c2b0144c 100644 --- a/schemas/iso/datetime/2019/datetime/week-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day (Basic Format)", "description": "A representation of week date combined with complete local time of day in basic format [YYYY][\"W\"][ww][D][\"T\"][hh][mm][ss] where the time designator \"T\" separates date from time (§5.4.2.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985W155T232050", "2000W011T000000", diff --git a/schemas/iso/datetime/2019/datetime/week-extended/v1.json b/schemas/iso/datetime/2019/datetime/week-extended/v1.json index f26d9202..dce1524d 100644 --- a/schemas/iso/datetime/2019/datetime/week-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day (Extended Format)", "description": "A representation of week date combined with complete local time of day in extended format [YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][\":\"[ss] where the time designator \"T\" separates date from time (§5.4.2.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-W15-5T23:20:50", "2000-W01-1T00:00:00", diff --git a/schemas/iso/datetime/2019/datetime/week-minute-shift-basic/v1.json b/schemas/iso/datetime/2019/datetime/week-minute-shift-basic/v1.json index adc7536e..ffe1a54e 100644 --- a/schemas/iso/datetime/2019/datetime/week-minute-shift-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-minute-shift-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Time Shift and Reduced Precision (Basic Format)", "description": "A representation of week date combined with reduced precision local time of day (hour and minute only) and time shift from UTC in basic format [YYYY][\"W\"][ww][D][\"T\"][hh][mm][±][hh][mm] where seconds are omitted (§5.4.3 c)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985W155T1015+0400", "2000W011T0000-0500", diff --git a/schemas/iso/datetime/2019/datetime/week-minute-shift-extended/v1.json b/schemas/iso/datetime/2019/datetime/week-minute-shift-extended/v1.json index 880a1f70..d9f69ad3 100644 --- a/schemas/iso/datetime/2019/datetime/week-minute-shift-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-minute-shift-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Time Shift and Reduced Precision (Extended Format)", "description": "A representation of week date combined with reduced precision local time of day (hour and minute only) and time shift from UTC in extended format [YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][±][hh][\":\"[mm] where seconds are omitted (§5.4.3 c)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-W15-5T10:15+04:00", "2000-W01-1T00:00-05:00", diff --git a/schemas/iso/datetime/2019/datetime/week-shift-basic/v1.json b/schemas/iso/datetime/2019/datetime/week-shift-basic/v1.json index 051ed3f3..4aa7d38b 100644 --- a/schemas/iso/datetime/2019/datetime/week-shift-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-shift-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Time Shift (Basic Format)", "description": "A representation of week date combined with complete local time of day and time shift from UTC in basic format [YYYY][\"W\"][ww][D][\"T\"][hh][mm][ss][±][hh][mm] where the time shift includes hours and minutes (§5.4.2.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985W155T232050+0400", "2000W011T000000-0500", diff --git a/schemas/iso/datetime/2019/datetime/week-shift-extended/v1.json b/schemas/iso/datetime/2019/datetime/week-shift-extended/v1.json index 72cce4b3..aa37e918 100644 --- a/schemas/iso/datetime/2019/datetime/week-shift-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-shift-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Time Shift (Extended Format)", "description": "A representation of week date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh][\":\"[mm] where the time shift includes hours and minutes (§5.4.2.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-W15-5T23:20:50+04:00", "2000-W01-1T00:00:00-05:00", diff --git a/schemas/iso/datetime/2019/datetime/week-shifthour-basic/v1.json b/schemas/iso/datetime/2019/datetime/week-shifthour-basic/v1.json index df7761ce..1f1a13e1 100644 --- a/schemas/iso/datetime/2019/datetime/week-shifthour-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-shifthour-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Hourly Time Shift (Basic Format)", "description": "A representation of week date combined with complete local time of day and time shift from UTC in basic format [YYYY][\"W\"][ww][D][\"T\"][hh][mm][ss][±][hh] where the time shift includes only hours (§5.4.2.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985W155T232050+04", "2000W011T000000-05", diff --git a/schemas/iso/datetime/2019/datetime/week-shifthour-extended/v1.json b/schemas/iso/datetime/2019/datetime/week-shifthour-extended/v1.json index f2698952..4efd5ccf 100644 --- a/schemas/iso/datetime/2019/datetime/week-shifthour-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-shifthour-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and Local Time of Day with Hourly Time Shift (Extended Format)", "description": "A representation of week date combined with complete local time of day and time shift from UTC in extended format [YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][\":\"[ss][±][hh] where the time shift includes only hours (§5.4.2.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-W15-5T23:20:50+04", "2000-W01-1T00:00:00-05", diff --git a/schemas/iso/datetime/2019/datetime/week-utc-basic/v1.json b/schemas/iso/datetime/2019/datetime/week-utc-basic/v1.json index 4604d5b2..642c193d 100644 --- a/schemas/iso/datetime/2019/datetime/week-utc-basic/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-utc-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and UTC of Day (Basic Format)", "description": "A representation of week date combined with complete UTC of day in basic format [YYYY][\"W\"][ww][D][\"T\"][hh][mm][ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985W155T232050Z", "2000W011T000000Z", diff --git a/schemas/iso/datetime/2019/datetime/week-utc-extended/v1.json b/schemas/iso/datetime/2019/datetime/week-utc-extended/v1.json index 7fb17975..15d31b32 100644 --- a/schemas/iso/datetime/2019/datetime/week-utc-extended/v1.json +++ b/schemas/iso/datetime/2019/datetime/week-utc-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Week Date and UTC of Day (Extended Format)", "description": "A representation of week date combined with complete UTC of day in extended format [YYYY][\"-\"][\"W\"][ww][\"-\"][D][\"T\"][hh][\":\"[mm][\":\"[ss][\"Z\"] where \"Z\" is the UTC designator (§5.4.2.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "1985-W15-5T23:20:50Z", "2000-W01-1T00:00:00Z", diff --git a/schemas/iso/datetime/2019/time/beginning-day-basic/v1.json b/schemas/iso/datetime/2019/time/beginning-day-basic/v1.json index 8d05dcd8..5503a8ed 100644 --- a/schemas/iso/datetime/2019/time/beginning-day-basic/v1.json +++ b/schemas/iso/datetime/2019/time/beginning-day-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Beginning of the Day (Basic Format)", "description": "A representation of the beginning of a calendar day in basic format [\"T\"]000000 where the time designator \"T\" may be omitted by mutual agreement (§5.3.2)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T000000", "000000" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/beginning-day-extended/v1.json b/schemas/iso/datetime/2019/time/beginning-day-extended/v1.json index 77987d8f..5c0848cb 100644 --- a/schemas/iso/datetime/2019/time/beginning-day-extended/v1.json +++ b/schemas/iso/datetime/2019/time/beginning-day-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Beginning of the Day (Extended Format)", "description": "A representation of the beginning of a calendar day in extended format 00:00:00 or [\"T\"]00:00:00 where the time designator \"T\" may be omitted by mutual agreement (§5.3.2)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "00:00:00", "T00:00:00" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/decimal-hour-basic/v1.json b/schemas/iso/datetime/2019/time/decimal-hour-basic/v1.json index 873aa539..36691f04 100644 --- a/schemas/iso/datetime/2019/time/decimal-hour-basic/v1.json +++ b/schemas/iso/datetime/2019/time/decimal-hour-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Decimal Hour (Basic Format)", "description": "A representation of local time of day with decimal fraction of hour in basic format [\"T\"][hh][,][n] or [\"T\"][hh][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 e)", - "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. Extended format is not applicable for hour-only representations", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. Extended format is not applicable for hour-only representations. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T23,3", "T23.3", "T00,0", "T12.5", "T15,75" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/decimal-minute-basic/v1.json b/schemas/iso/datetime/2019/time/decimal-minute-basic/v1.json index 665c5cbf..22dbcf6e 100644 --- a/schemas/iso/datetime/2019/time/decimal-minute-basic/v1.json +++ b/schemas/iso/datetime/2019/time/decimal-minute-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Decimal Minute (Basic Format)", "description": "A representation of local time of day with decimal fraction of minute in basic format [\"T\"][hh][mm][,][n] or [\"T\"][hh][mm][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 c)", - "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T2320,8", "T2320.8", "T0000,0", "T2359,999", "T1200.5" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/decimal-minute-extended/v1.json b/schemas/iso/datetime/2019/time/decimal-minute-extended/v1.json index d966f20d..578607cc 100644 --- a/schemas/iso/datetime/2019/time/decimal-minute-extended/v1.json +++ b/schemas/iso/datetime/2019/time/decimal-minute-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Decimal Minute (Extended Format)", "description": "A representation of local time of day with decimal fraction of minute in extended format [hh][:][mm][,][n] or [\"T\"][hh][:][mm][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 d)", - "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "23:20,8", "T23:20.8", "00:00,0", "T23:59,999", "12:00.5" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/decimal-second-basic/v1.json b/schemas/iso/datetime/2019/time/decimal-second-basic/v1.json index eafe8222..fbe8565b 100644 --- a/schemas/iso/datetime/2019/time/decimal-second-basic/v1.json +++ b/schemas/iso/datetime/2019/time/decimal-second-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Decimal Second (Basic Format)", "description": "A representation of local time of day with decimal fraction of second in basic format [\"T\"][hh][mm][ss][,][n] or [\"T\"][hh][mm][ss][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 a)", - "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T232030,5", "T232030.5", diff --git a/schemas/iso/datetime/2019/time/decimal-second-extended/v1.json b/schemas/iso/datetime/2019/time/decimal-second-extended/v1.json index 154a777a..fdf7e921 100644 --- a/schemas/iso/datetime/2019/time/decimal-second-extended/v1.json +++ b/schemas/iso/datetime/2019/time/decimal-second-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Decimal Second (Extended Format)", "description": "A representation of local time of day with decimal fraction of second in extended format [hh][:][mm][:][ss][,][n] or [\"T\"][hh][:][mm][:][ss][.][n] where the time designator \"T\" may be omitted by mutual agreement and the decimal sign may be a comma or period (§5.3.1.4 b)", - "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs", + "$comment": "The decimal fraction must have at least one digit. The standard allows both comma and period as decimal signs. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "23:20:30,5", "T23:20:30.5", diff --git a/schemas/iso/datetime/2019/time/hour-basic/v1.json b/schemas/iso/datetime/2019/time/hour-basic/v1.json index 33bb794a..37631bb0 100644 --- a/schemas/iso/datetime/2019/time/hour-basic/v1.json +++ b/schemas/iso/datetime/2019/time/hour-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day - Hour Only (Basic Format)", "description": "A representation of local time of day with reduced precision to hour only in basic format [\"T\"][hh] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 c)", - "$comment": "Extended format is not applicable for hour-only representations as there are no separators to extend", + "$comment": "Extended format is not applicable for hour-only representations as there are no separators to extend. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T23", "T00", "T12", "T01", "T15" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/hour-minute-basic/v1.json b/schemas/iso/datetime/2019/time/hour-minute-basic/v1.json index f0d91864..bc9f18b2 100644 --- a/schemas/iso/datetime/2019/time/hour-minute-basic/v1.json +++ b/schemas/iso/datetime/2019/time/hour-minute-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day - Hour and Minute (Basic Format)", "description": "A representation of local time of day with reduced precision to hour and minute in basic format [\"T\"][hh][mm] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T2320", "T0000", "T2359", "T1200", "T0101" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/hour-minute-extended/v1.json b/schemas/iso/datetime/2019/time/hour-minute-extended/v1.json index 4e1a1a50..f1a0f628 100644 --- a/schemas/iso/datetime/2019/time/hour-minute-extended/v1.json +++ b/schemas/iso/datetime/2019/time/hour-minute-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day - Hour and Minute (Extended Format)", "description": "A representation of local time of day with reduced precision to hour and minute in extended format [hh][:][mm] or [\"T\"][hh][:][mm] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.3 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "23:20", "T23:20", "00:00", "T23:59", "12:00", "T01:01" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/local-day-basic/v1.json b/schemas/iso/datetime/2019/time/local-day-basic/v1.json index aabb6923..36dc78c3 100644 --- a/schemas/iso/datetime/2019/time/local-day-basic/v1.json +++ b/schemas/iso/datetime/2019/time/local-day-basic/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day (Basic Format)", "description": "A complete representation of local time of day in basic format [\"T\"][hh][mm][ss] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.2 a)", - "$comment": "This schema provides syntactic validation only. Semantic validation (i.e leap second validity in specific contexts) must be performed by the consumer", + "$comment": "This schema provides syntactic validation only. Semantic validation (i.e leap second validity in specific contexts) must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T232050", "T000000", "T235960", "T120000", "T010101" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/local-day-extended/v1.json b/schemas/iso/datetime/2019/time/local-day-extended/v1.json index f3f82f59..94cf6872 100644 --- a/schemas/iso/datetime/2019/time/local-day-extended/v1.json +++ b/schemas/iso/datetime/2019/time/local-day-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day (Extended Format)", "description": "A complete representation of local time of day in extended format [hh][:][mm][:][ss] or [\"T\"][hh][:][mm][:][ss] where the time designator \"T\" may be omitted by mutual agreement (§5.3.1.2 b)", - "$comment": "This schema provides syntactic validation only. Semantic validation (i.e leap second validity in specific contexts) must be performed by the consumer", + "$comment": "This schema provides syntactic validation only. Semantic validation (i.e leap second validity in specific contexts) must be performed by the consumer. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "23:20:50", "T23:20:50", diff --git a/schemas/iso/datetime/2019/time/local-day-shift-basic/v1.json b/schemas/iso/datetime/2019/time/local-day-shift-basic/v1.json index aca715fe..6aabdbbc 100644 --- a/schemas/iso/datetime/2019/time/local-day-shift-basic/v1.json +++ b/schemas/iso/datetime/2019/time/local-day-shift-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Time Shift (Basic Format)", "description": "A representation of local time of day with time shift from UTC in basic format [\"T\"][hh][mm][ss][±][hh][mm] or [\"T\"][hh][mm][ss][±][hh] or [\"T\"][hh][mm][ss]Z where the time designator \"T\" may be omitted by mutual agreement and the time shift may include hours only or be Z for UTC (§5.3.4.2 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T152746+0100", "T152746-0530", diff --git a/schemas/iso/datetime/2019/time/local-day-shift-extended/v1.json b/schemas/iso/datetime/2019/time/local-day-shift-extended/v1.json index 8ece061d..3f940d71 100644 --- a/schemas/iso/datetime/2019/time/local-day-shift-extended/v1.json +++ b/schemas/iso/datetime/2019/time/local-day-shift-extended/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Local Time of Day with Time Shift (Extended Format)", "description": "A representation of local time of day with time shift from UTC in extended format [hh][:][mm][:][ss][±][hh][:][mm] or [\"T\"][hh][:][mm][:][ss][±][hh] or [hh][:][mm][:][ss]Z where the time designator \"T\" may be omitted by mutual agreement and the time shift may include hours only or be Z for UTC (§5.3.4.2 b)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "15:27:46+01:00", "T15:27:46-05:30", diff --git a/schemas/iso/datetime/2019/time/shift-basic/v1.json b/schemas/iso/datetime/2019/time/shift-basic/v1.json index a9219b2a..a7e14723 100644 --- a/schemas/iso/datetime/2019/time/shift-basic/v1.json +++ b/schemas/iso/datetime/2019/time/shift-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Time Shift from UTC (Basic Format)", "description": "A representation of the time shift between local time scale and UTC in basic format [±][hh][mm] or [±][hh] or Z where Z is the UTC designator representing zero shift (§5.3.4.1)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "+0100", "-0530", "+00", "-12", "Z", "+1400", "+0000" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/shift-extended/v1.json b/schemas/iso/datetime/2019/time/shift-extended/v1.json index 3913eecb..bfb2ca6b 100644 --- a/schemas/iso/datetime/2019/time/shift-extended/v1.json +++ b/schemas/iso/datetime/2019/time/shift-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 Time Shift from UTC (Extended Format)", "description": "A representation of the time shift between local time scale and UTC in extended format [±][hh][:][mm] or Z where Z is the UTC designator representing zero shift (§5.3.4.1)", - "$comment": "Extended format is not applicable for hour-only time shifts", + "$comment": "Extended format is not applicable for hour-only time shifts. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "+01:00", "-05:30", "Z", "+14:00", "+00:00", "+12:45" ], "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", "x-links": [ "https://www.iso.org/standard/70907.html" ], diff --git a/schemas/iso/datetime/2019/time/utc-day-basic/v1.json b/schemas/iso/datetime/2019/time/utc-day-basic/v1.json index 80483d31..cfae23c8 100644 --- a/schemas/iso/datetime/2019/time/utc-day-basic/v1.json +++ b/schemas/iso/datetime/2019/time/utc-day-basic/v1.json @@ -2,6 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 UTC of Day (Basic Format)", "description": "A representation of UTC of day in basic format [\"T\"][hh][mm][ss]Z or [\"T\"][hh][mm]Z or [\"T\"][hh]Z where the time designator \"T\" may be omitted by mutual agreement and Z is the UTC designator (§5.3.3 a)", + "$comment": "No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "T232030Z", "T2320Z", diff --git a/schemas/iso/datetime/2019/time/utc-day-extended/v1.json b/schemas/iso/datetime/2019/time/utc-day-extended/v1.json index d4090ff8..4044d584 100644 --- a/schemas/iso/datetime/2019/time/utc-day-extended/v1.json +++ b/schemas/iso/datetime/2019/time/utc-day-extended/v1.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ISO 8601-1:2019 UTC of Day (Extended Format)", "description": "A representation of UTC of day in extended format [hh][:][mm][:][ss]Z or [\"T\"][hh][:][mm][:][ss]Z or [hh][:][mm]Z or [\"T\"][hh][:][mm]Z where the time designator \"T\" may be omitted by mutual agreement and Z is the UTC designator (§5.3.3 b)", - "$comment": "Extended format is not applicable for hour-only representations", + "$comment": "Extended format is not applicable for hour-only representations. No linked data datatype is declared because ISO 8601 details such as the leap second put this representation outside the lexical space of the XML Schema date and time datatypes", "examples": [ "23:20:30Z", "T23:20:30Z", diff --git a/scripts/quality-schemas-tests-mirror.sh b/scripts/quality-schemas-tests-mirror.sh index 52ab7291..e2a788ea 100755 --- a/scripts/quality-schemas-tests-mirror.sh +++ b/scripts/quality-schemas-tests-mirror.sh @@ -3,34 +3,38 @@ set -o errexit set -o nounset -SCHEMAS_DIR="$(pwd)/schemas" -TESTS_DIR="$(pwd)/test/schemas" +TESTS_DIR="$(pwd)/test" EXIT_CODE=0 -find "$SCHEMAS_DIR" -type f -name "*.json" | while IFS= read -r schema_file +for source_root in schemas examples do - relative_path="${schema_file#"$SCHEMAS_DIR"/}" - base_name="${relative_path%.json}" - expected_test="$TESTS_DIR/${base_name}.test.json" - - if [ ! -f "$expected_test" ] - then - echo "ERROR: Schema '$schema_file' is missing corresponding test '$expected_test'" >&2 - exit 1 - fi -done || EXIT_CODE=1 - -find "$TESTS_DIR" -type f -name "*.test.json" | while IFS= read -r test_file -do - relative_path="${test_file#"$TESTS_DIR"/}" - base_name="${relative_path%.test.json}" - expected_schema="$SCHEMAS_DIR/${base_name}.json" - - if [ ! -f "$expected_schema" ] - then - echo "ERROR: Test '$test_file' is missing corresponding schema '$expected_schema'" >&2 - exit 1 - fi -done || EXIT_CODE=1 + SOURCE_DIR="$(pwd)/$source_root" + + find "$SOURCE_DIR" -type f -name "*.json" | while IFS= read -r source_file + do + relative_path="${source_file#"$SOURCE_DIR"/}" + base_name="${relative_path%.json}" + expected_test="$TESTS_DIR/$source_root/${base_name}.test.json" + + if [ ! -f "$expected_test" ] + then + echo "ERROR: Schema '$source_file' is missing corresponding test '$expected_test'" >&2 + exit 1 + fi + done || EXIT_CODE=1 + + find "$TESTS_DIR/$source_root" -type f -name "*.test.json" | while IFS= read -r test_file + do + relative_path="${test_file#"$TESTS_DIR/$source_root"/}" + base_name="${relative_path%.test.json}" + expected_source="$SOURCE_DIR/${base_name}.json" + + if [ ! -f "$expected_source" ] + then + echo "ERROR: Test '$test_file' is missing corresponding schema '$expected_source'" >&2 + exit 1 + fi + done || EXIT_CODE=1 +done exit $EXIT_CODE diff --git a/test/examples/athlete-profile.test.json b/test/examples/athlete-profile.test.json new file mode 100644 index 00000000..2f9ca4b5 --- /dev/null +++ b/test/examples/athlete-profile.test.json @@ -0,0 +1,141 @@ +{ + "target": "../../examples/athlete-profile.json", + "tests": [ + { + "description": "Valid - complete profile", + "data": { + "name": "Lionel Messi", + "birthDate": "1987-06-24", + "nationality": "AR", + "height": 1.7, + "weight": 72, + "languages": [ "es", "en" ] + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Person" ], + "https://schema.org/birthDate": [ + { + "@value": "1987-06-24", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + ], + "https://schema.org/height": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 1.7 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/M" + } + ] + } + ], + "https://schema.org/knowsLanguage": [ + { + "@id": "http://id.loc.gov/vocabulary/iso639-1/es" + }, + { + "@id": "http://id.loc.gov/vocabulary/iso639-1/en" + } + ], + "https://schema.org/name": [ + { + "@value": "Lionel Messi" + } + ], + "https://schema.org/nationality": [ + { + "@id": "http://publications.europa.eu/resource/authority/country/ARG" + } + ], + "https://schema.org/weight": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 72 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/KiloGM" + } + ] + } + ] + } + ] + }, + { + "description": "Valid - minimal profile", + "data": { + "name": "Simone Biles", + "nationality": "US" + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Person" ], + "https://schema.org/name": [ + { + "@value": "Simone Biles" + } + ], + "https://schema.org/nationality": [ + { + "@id": "http://publications.europa.eu/resource/authority/country/USA" + } + ] + } + ] + }, + { + "description": "Invalid - missing nationality", + "data": { + "name": "Lionel Messi" + }, + "valid": false + }, + { + "description": "Invalid - alpha-3 country code", + "data": { + "name": "Lionel Messi", + "nationality": "ARG" + }, + "valid": false + }, + { + "description": "Invalid - negative height", + "data": { + "name": "Lionel Messi", + "nationality": "AR", + "height": -1.7 + }, + "valid": false + }, + { + "description": "Invalid - set-2 language code in the list", + "data": { + "name": "Lionel Messi", + "nationality": "AR", + "languages": [ "spa" ] + }, + "valid": false + }, + { + "description": "Invalid - unknown property", + "data": { + "name": "Lionel Messi", + "nationality": "AR", + "club": "Inter Miami" + }, + "valid": false + } + ] +} diff --git a/test/examples/dataset-catalog.test.json b/test/examples/dataset-catalog.test.json new file mode 100644 index 00000000..970e3525 --- /dev/null +++ b/test/examples/dataset-catalog.test.json @@ -0,0 +1,111 @@ +{ + "target": "../../examples/dataset-catalog.json", + "tests": [ + { + "description": "Valid - complete entry", + "data": { + "title": "Buenos Aires Air Quality Measurements", + "landingPage": "https://data.example.com/air-quality", + "catalog": { + "title": "City of Buenos Aires Open Data" + }, + "provenance": { + "creator": "Environmental Protection Agency", + "created": "2024-11-02" + } + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://www.w3.org/ns/dcat#Dataset" ], + "@reverse": { + "http://www.w3.org/ns/dcat#dataset": [ + { + "@type": [ "http://www.w3.org/ns/dcat#Catalog" ], + "http://purl.org/dc/terms/title": [ + { + "@value": "City of Buenos Aires Open Data" + } + ] + } + ] + }, + "http://www.w3.org/ns/dcat#landingPage": [ + { + "@id": "https://data.example.com/air-quality" + } + ], + "http://purl.org/dc/terms/provenance": [ + { + "@graph": [ + { + "http://purl.org/dc/terms/created": [ + { + "@value": "2024-11-02", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + ], + "http://purl.org/dc/terms/creator": [ + { + "@value": "Environmental Protection Agency" + } + ] + } + ] + } + ], + "http://purl.org/dc/terms/title": [ + { + "@value": "Buenos Aires Air Quality Measurements" + } + ] + } + ] + }, + { + "description": "Valid - title only", + "data": { + "title": "Buenos Aires Air Quality Measurements" + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://www.w3.org/ns/dcat#Dataset" ], + "http://purl.org/dc/terms/title": [ + { + "@value": "Buenos Aires Air Quality Measurements" + } + ] + } + ] + }, + { + "description": "Invalid - missing title", + "data": { + "landingPage": "https://data.example.com/air-quality" + }, + "valid": false + }, + { + "description": "Invalid - unknown catalog property", + "data": { + "title": "Buenos Aires Air Quality Measurements", + "catalog": { + "title": "City of Buenos Aires Open Data", + "homepage": "https://data.example.com" + } + }, + "valid": false + }, + { + "description": "Invalid - basic format provenance date", + "data": { + "title": "Buenos Aires Air Quality Measurements", + "provenance": { + "created": "20241102" + } + }, + "valid": false + } + ] +} diff --git a/test/examples/legacy-inventory.test.json b/test/examples/legacy-inventory.test.json new file mode 100644 index 00000000..7de8362a --- /dev/null +++ b/test/examples/legacy-inventory.test.json @@ -0,0 +1,112 @@ +{ + "target": "../../examples/legacy-inventory.json", + "tests": [ + { + "description": "Valid - complete item", + "data": { + "sku": "WH-4821-B", + "currency": "USD", + "unitPrice": 12.5, + "originCountry": "CN", + "attributes": { + "shelf": "B4", + "fragile": false, + "batch": null + } + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://inventory.example.com/vocab#Item" ], + "https://inventory.example.com/vocab#attributes": [ + { + "@value": { + "shelf": "B4", + "fragile": false, + "batch": null + }, + "@type": "@json" + } + ], + "https://inventory.example.com/vocab#currency": [ + { + "@value": "USD" + } + ], + "https://inventory.example.com/vocab#originCountry": [ + { + "@id": "http://publications.europa.eu/resource/authority/country/CHN" + } + ], + "https://inventory.example.com/vocab#sku": [ + { + "@value": "WH-4821-B" + } + ], + "https://inventory.example.com/vocab#unitPrice": [ + { + "@value": 12.5 + } + ] + } + ] + }, + { + "description": "Valid - minimal item", + "data": { + "sku": "WH-0001-A", + "currency": "ARS", + "unitPrice": 0 + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://inventory.example.com/vocab#Item" ], + "https://inventory.example.com/vocab#currency": [ + { + "@value": "ARS" + } + ], + "https://inventory.example.com/vocab#sku": [ + { + "@value": "WH-0001-A" + } + ], + "https://inventory.example.com/vocab#unitPrice": [ + { + "@value": 0 + } + ] + } + ] + }, + { + "description": "Invalid - alpha-2 currency code", + "data": { + "sku": "WH-4821-B", + "currency": "US", + "unitPrice": 12.5 + }, + "valid": false + }, + { + "description": "Invalid - negative unit price", + "data": { + "sku": "WH-4821-B", + "currency": "USD", + "unitPrice": -1 + }, + "valid": false + }, + { + "description": "Invalid - attributes as an array", + "data": { + "sku": "WH-4821-B", + "currency": "USD", + "unitPrice": 12.5, + "attributes": [ "fragile" ] + }, + "valid": false + } + ] +} diff --git a/test/examples/product-listing.test.json b/test/examples/product-listing.test.json new file mode 100644 index 00000000..a4d1454e --- /dev/null +++ b/test/examples/product-listing.test.json @@ -0,0 +1,138 @@ +{ + "target": "../../examples/product-listing.json", + "tests": [ + { + "description": "Valid - complete listing", + "data": { + "name": { + "en": "Wireless Mouse", + "fr": "Souris sans fil" + }, + "price": 29.99, + "priceCurrency": "EUR", + "weight": 0.085, + "countryOfOrigin": "DE" + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Product" ], + "https://schema.org/countryOfOrigin": [ + { + "@id": "http://publications.europa.eu/resource/authority/country/DEU" + } + ], + "https://schema.org/name": [ + { + "@value": "Wireless Mouse", + "@language": "en" + }, + { + "@value": "Souris sans fil", + "@language": "fr" + } + ], + "https://schema.org/price": [ + { + "@value": 29.99 + } + ], + "https://schema.org/priceCurrency": [ + { + "@id": "http://publications.europa.eu/resource/authority/currency/EUR" + } + ], + "https://schema.org/weight": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 0.085 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/KiloGM" + } + ] + } + ] + } + ] + }, + { + "description": "Valid - minimal listing", + "data": { + "name": { + "en": "USB Cable" + }, + "price": 5, + "priceCurrency": "USD" + }, + "valid": true, + "rdf": [ + { + "@type": [ "https://schema.org/Product" ], + "https://schema.org/name": [ + { + "@value": "USB Cable", + "@language": "en" + } + ], + "https://schema.org/price": [ + { + "@value": 5 + } + ], + "https://schema.org/priceCurrency": [ + { + "@id": "http://publications.europa.eu/resource/authority/currency/USD" + } + ] + } + ] + }, + { + "description": "Invalid - empty name map", + "data": { + "name": {}, + "price": 29.99, + "priceCurrency": "EUR" + }, + "valid": false + }, + { + "description": "Invalid - underscore in the language tag key", + "data": { + "name": { + "en_US": "Wireless Mouse" + }, + "price": 29.99, + "priceCurrency": "EUR" + }, + "valid": false + }, + { + "description": "Invalid - negative price", + "data": { + "name": { + "en": "Wireless Mouse" + }, + "price": -1, + "priceCurrency": "EUR" + }, + "valid": false + }, + { + "description": "Invalid - unknown currency code", + "data": { + "name": { + "en": "Wireless Mouse" + }, + "price": 29.99, + "priceCurrency": "EU" + }, + "valid": false + } + ] +} diff --git a/test/examples/publication-record.test.json b/test/examples/publication-record.test.json new file mode 100644 index 00000000..73ccb444 --- /dev/null +++ b/test/examples/publication-record.test.json @@ -0,0 +1,109 @@ +{ + "target": "../../examples/publication-record.json", + "tests": [ + { + "description": "Valid - complete record", + "data": { + "title": "ألف ليلة وليلة", + "abstract": "مجموعة من القصص الشعبية من العصر الذهبي الإسلامي", + "language": "ara", + "issued": "2019-03-14", + "license": "https://creativecommons.org/licenses/by/4.0/" + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://purl.org/dc/terms/BibliographicResource" ], + "http://purl.org/dc/terms/abstract": [ + { + "@value": "مجموعة من القصص الشعبية من العصر الذهبي الإسلامي", + "@language": "ar", + "@direction": "rtl" + } + ], + "http://purl.org/dc/terms/issued": [ + { + "@value": "2019-03-14", + "@type": "http://www.w3.org/2001/XMLSchema#date" + } + ], + "http://purl.org/dc/terms/language": [ + { + "@id": "http://id.loc.gov/vocabulary/iso639-2/ara" + } + ], + "http://purl.org/dc/terms/license": [ + { + "@id": "https://creativecommons.org/licenses/by/4.0/" + } + ], + "http://purl.org/dc/terms/title": [ + { + "@value": "ألف ليلة وليلة", + "@language": "ar", + "@direction": "rtl" + } + ] + } + ] + }, + { + "description": "Valid - reserved local-use language of the work", + "data": { + "title": "مخطوطة بلهجة محلية", + "language": "qaa" + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://purl.org/dc/terms/BibliographicResource" ], + "http://purl.org/dc/terms/language": [ + { + "@value": "qaa" + } + ], + "http://purl.org/dc/terms/title": [ + { + "@value": "مخطوطة بلهجة محلية", + "@language": "ar", + "@direction": "rtl" + } + ] + } + ] + }, + { + "description": "Invalid - missing language", + "data": { + "title": "ألف ليلة وليلة" + }, + "valid": false + }, + { + "description": "Invalid - set-1 language code", + "data": { + "title": "ألف ليلة وليلة", + "language": "ar" + }, + "valid": false + }, + { + "description": "Invalid - basic format date", + "data": { + "title": "ألف ليلة وليلة", + "language": "ara", + "issued": "20190314" + }, + "valid": false + }, + { + "description": "Invalid - relative license reference", + "data": { + "title": "ألف ليلة وليلة", + "language": "ara", + "license": "licenses/by/4.0" + }, + "valid": false + } + ] +} diff --git a/test/examples/sensor-reading.test.json b/test/examples/sensor-reading.test.json new file mode 100644 index 00000000..5e5134a3 --- /dev/null +++ b/test/examples/sensor-reading.test.json @@ -0,0 +1,140 @@ +{ + "target": "../../examples/sensor-reading.json", + "tests": [ + { + "description": "Valid - complete observation", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 743.2, + "resultTime": "2026-08-03T14:30:00Z", + "location": { + "type": "Point", + "coordinates": [ -58.3816, -34.6037 ] + } + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://www.w3.org/ns/sosa/Observation" ], + "https://schema.org/location": [ + { + "@type": [ "https://purl.org/geojson/vocab#Point" ], + "https://purl.org/geojson/vocab#coordinates": [ + { + "@list": [ + { + "@value": -58.3816 + }, + { + "@value": -34.6037 + } + ] + } + ] + } + ], + "http://www.w3.org/ns/sosa/observedProperty": [ + { + "@id": "http://qudt.org/vocab/quantitykind/Voltage" + } + ], + "http://www.w3.org/ns/sosa/hasResult": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 743.2 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/MilliV" + } + ] + } + ], + "http://www.w3.org/ns/sosa/resultTime": [ + { + "@value": "2026-08-03T14:30:00Z" + } + ] + } + ] + }, + { + "description": "Valid - observation without a location", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 12, + "resultTime": "2026-08-03T14:31:00Z" + }, + "valid": true, + "rdf": [ + { + "@type": [ "http://www.w3.org/ns/sosa/Observation" ], + "http://www.w3.org/ns/sosa/observedProperty": [ + { + "@id": "http://qudt.org/vocab/quantitykind/Voltage" + } + ], + "http://www.w3.org/ns/sosa/hasResult": [ + { + "@type": [ "http://qudt.org/schema/qudt/Quantity" ], + "http://qudt.org/schema/qudt/value": [ + { + "@value": 12 + } + ], + "http://qudt.org/schema/qudt/hasUnit": [ + { + "@id": "http://qudt.org/vocab/unit/MilliV" + } + ] + } + ], + "http://www.w3.org/ns/sosa/resultTime": [ + { + "@value": "2026-08-03T14:31:00Z" + } + ] + } + ] + }, + { + "description": "Invalid - missing result time", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 743.2 + }, + "valid": false + }, + { + "description": "Invalid - space separated timestamp", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 743.2, + "resultTime": "2026-08-03 14:30:00Z" + }, + "valid": false + }, + { + "description": "Invalid - result as a string", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": "743.2", + "resultTime": "2026-08-03T14:30:00Z" + }, + "valid": false + }, + { + "description": "Invalid - location as a bare coordinate pair", + "data": { + "observedProperty": "http://qudt.org/vocab/quantitykind/Voltage", + "result": 743.2, + "resultTime": "2026-08-03T14:30:00Z", + "location": [ -58.3816, -34.6037 ] + }, + "valid": false + } + ] +}