You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The main change relates to the ability to describe meaning of enum values
related to opengeospatial/ogcapi-coverages#173 (comment)
using a combination of `anyOf` with `const` + `title` as described in
https://stackoverflow.com/questions/64233370/in-json-schema-how-to-define-an-enum-with-description-of-each-elements-in-the-e
- Changes also introduce a new `x-ogc-nilValues` keyword for identifying nil values
- Other changes are gramamr fixes and minor clarifications
- Changing indirect dependency to QUDT in general as opposed to QUDT units since QUDT can also used for
semantic definitions (not only QUDT units)
- Clarified that JSON Schema keywords can also include additional keywords in section below
Copy file name to clipboardExpand all lines: extensions/schemas/standard/clause_3_references.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The following normative documents contain provisions that, through reference in
9
9
10
10
* [[ogc06_103r4]] Open Geospatial Consortium (OGC). OGC 06-103r4: **OpenGIS® Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture**. Edited by J. Herring. 2011. Available at http://portal.opengeospatial.org/files/?artifact_id=25355
11
11
12
-
* [[qudtunits]] QUDT.org. **QUDT Units Vocabulary 2.1**. Edited by R. Hodgson. 2024. Available at https://www.qudt.org/doc/DOC_VOCAB-UNITS.html.
12
+
* [[qudt]] QUDT.org. **QUDT Ontologies, derived models and vocabularies 2.1**. Edited by R. Hodgson. 2024. Available at https://www.qudt.org/.
13
13
14
14
* [[ucum]] Regenstrief Institute, Inc. **The Unified Code for Units of Measure**. Edited by G. Schadow, .C J. McDonald. 2017. Available at https://ucum.org/ucum.
Copy file name to clipboardExpand all lines: extensions/schemas/standard/clause_7_schemas.adoc
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The Requirements Class "Schemas" specifies basic provisions for schemas of items
12
12
|Indirect Dependency |<<json-schema-validation,JSON Schema Validation: A Vocabulary for Structural Validation of JSON>>
13
13
|Indirect Dependency |<<ogc06_103r4,Simple feature access - Part 1: Common architecture>>
14
14
|Indirect Dependency |<<ucum,The Unified Code for Units of Measure>>
15
-
|Indirect Dependency |<<qudtunits,QUDT Units Vocabulary>>
15
+
|Indirect Dependency |<<qudt,QUDT Ontologies, derived models and vocabularies>>
16
16
|===
17
17
18
18
[#schema-representation]
@@ -27,7 +27,7 @@ The Requirements Class "Schemas" specifies basic provisions for schemas of items
27
27
^|B |The schema SHALL have the following characteristics:
28
28
29
29
* "$schema" is "\https://json-schema.org/draft/2020-12/schema";
30
-
* "$id" is a HTTP(S) URI without query parameters that returns the schema, if requested with the header "Accept: application/schema+json"; and
30
+
* "$id" is a HTTP(S) URI without query parameters that returns the schema, if requested with the header "Accept: application/schema+json"; and
31
31
* "type" is "object".
32
32
|===
33
33
@@ -58,12 +58,13 @@ The following recommendations are intended to simplify parsing a schema and to h
58
58
^|C |Properties that represent a URI SHOULD be represented as a string with format "uri" or "uri-reference".
59
59
^|D |Properties that represent a URI template SHOULD be represented as a string with format "uri-template".
60
60
^|E |Properties that represent a UUID SHOULD be represented as a string with format "uuid".
61
-
^|F |For string properties that are, "minLength", "maxLength", "enum" and/or "pattern" SHOULD be provided, where applicable.
61
+
^|F |For string properties, "minLength", "maxLength", "enum" and/or "pattern" SHOULD be provided, where applicable.
62
62
^|G |For numeric properties, "multipleOf", "minimum", "exclusiveMinimum", "maximum", "exclusiveMaximum" SHOULD be provided, where applicable.
63
-
^|H |For integer properties that represent enumerated values, "enum" SHOULD be provided.
64
-
^|I |For array properties, the property SHOULD consist of items that are strings or numbers.
65
-
^|J |Required properties SHOULD be included in "required".
66
-
^|K |The JSON Schema keywords SHOULD be constrained to the those mentioned in this recommendation and requirement `/req/{req-class}/properties`.
63
+
^|H |For integer properties that represent enumerated values without providing a description for each, "enum" SHOULD be provided.
64
+
^|I |For integer properties that represent enumerated values while providing a description for each, "anyOf" with a combination of "const" and "title" for each entry SHOULD be provided.
65
+
^|J |For array properties, the property SHOULD consist of items that are strings or numbers.
66
+
^|K |Required properties SHOULD be included in "required".
67
+
^|L |The JSON Schema keywords SHOULD be constrained to those mentioned in this recommendation, requirement `/req/{req-class}/properties` and requirements in the _additional keywords_ section below.
67
68
|===
68
69
69
70
[#additional-keywords]
@@ -79,7 +80,7 @@ In order to be able to map the logical schema to a format-specific schema, exten
79
80
^|A |Additional keywords SHALL start with "x-ogc-".
80
81
|===
81
82
82
-
CAUTION: The next version of JSON Schema will likely restrict the use of additional keywords. As a result, this Standard may need to change the prefix or change the way as to how the vocabulary is extended.
83
+
CAUTION: The next version of JSON Schema will likely restrict the use of additional keywords. As a result, this Standard may need to change the prefix or change how the vocabulary is extended.
83
84
84
85
:req: role
85
86
[#{req-class}_{req}]
@@ -122,9 +123,9 @@ In geospatial data, numeric property values often represent a measurement and ha
122
123
^|A |The keyword "x-ogc-unit" SHALL be used to declare the unit of measure of the property.
123
124
^|B |The value of the keyword "x-ogc-unit" SHALL be a string representing the unit of measure.
124
125
^|C |The value of the keyword "x-ogc-unit" SHALL be the case sensitive UCUM representation ("c/s") unless a different language / register for units is identified in keyword "x-ogc-unitLang".
125
-
^|D |The value for UCUM, if explicitly declared as the language for units in keyword "x-ogc-unitLang", SHALL be "UCUM".
126
-
^|E |The value for the QUDT Units Vocabulary, if declared as the language for units in keyword "x-ogc-unitLang", SHALL be "QUDT".
127
-
^|F |The value of the keyword "x-ogc-unit" SHALL be the URI of the unit for values from the QUDT Units Vocabulary.
126
+
^|D |The value for UCUM, if explicitly declared as the language for units in keyword "x-ogc-unitLang", SHALL be "UCUM".
127
+
^|E |For specifying a unit from QUDT Units Vocabulary, "x-ogc-unitLang", SHALL be "QUDT".
128
+
^|F |For specifying a unit from QUDT Units Vocabulary, the value of the keyword "x-ogc-unit" SHALL be the URI of the unit.
128
129
|===
129
130
130
131
Communities or other OGC Standards can specify additional values for other unit languages, e.g., https://www.opengis.net/def/uom[units registered in the OGC Rainbow]. For each language it must be specified how units have to be represented in the "x-ogc-unit" value.
@@ -142,6 +143,15 @@ NOTE: For example, the value for hectopascal is `hPa` in UCUM and `\https://qudt
142
143
^|B |The value of the keyword "x-ogc-definition" SHALL be a URI.
^|A |The keyword "x-ogc-nilValues" SHALL be used to identify the values considered nil.
152
+
^|B |The value of the keyword "x-ogc-nilValues" SHALL be an array of objects, each including a mandatory "const" value and an optional "title" explanation of the meaning of that particular nil value.
153
+
|===
154
+
145
155
=== Examples
146
156
147
157
The following example is the schema of a feature type representing cultural entities. The schema includes additional keywords that apply to feature data (specified in the next Clause).
0 commit comments