Schema#
network-schema.json
is the single source of truth for defining OFDS’s objects and fields. It is documented using an extended version of JSON Schema 2020-12.
The source for network-schema.json
and other schema files is in the schema
directory of the standard repository.
JSON Schema usage#
The tables below list the validation keywords, types and formats used in the schema. For each keyword, type and format, the ‘Test data’ column contains a JSON pointer to a field in network-package-invalid.json
that fails validation.
Keywords#
Keyword |
Test Data |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Types#
Types are validated using the type
keyword.
Formats#
Formats are validated using the format
keyword.
Other normative rules#
The table below lists normative rules specified in field descriptions. For each rule, the ‘Test data’ column contains JSON pointers to the fields in network-package-additional-checks.json
that does not conform to the rule.
Rule |
Specified in |
Test data |
---|---|---|
Node reference is resolvable |
|
|
Node location type is ‘Point’ |
|
|
Node location coordinates format is a single position |
|
|
Span route geometry is ‘LineString’ |
|
|
Span route coordinates is an array of positions |
|
|
Phase reference is resolvable |
|
|
Phase name is consistent |
|
|
Organisation reference is resolvable |
|
|
Organisation name is consistent |
|
|
Node international connections country is present |
|
|
Identifier is unique |
|