From 4bdc7ce7c8820e87d9d4e95c69c29540cf7f7aa5 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Tue, 25 Oct 2022 11:55:37 +1300 Subject: [PATCH 1/4] Add a field for the version of the standard the data is published to --- codelists/open/linkRelationType.csv | 3 ++- examples/csv/links.csv | 2 ++ examples/csv/nodes.csv | 2 +- examples/csv/template/links.csv | 1 + examples/json/api-response.json | 16 ++++++++++++++-- examples/json/multiple-networks.json | 16 ++++++++++++++-- examples/json/network-embedded.json | 6 ++++++ examples/json/network-package.json | 8 +++++++- examples/json/network-separate-endpoints.json | 4 ++++ examples/json/network-separate-files.json | 4 ++++ schema/network-schema.csv | 2 +- schema/network-schema.json | 16 ++++++++++++++-- 12 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 examples/csv/links.csv create mode 100644 examples/csv/template/links.csv diff --git a/codelists/open/linkRelationType.csv b/codelists/open/linkRelationType.csv index 7d85c4e..8d8d7fc 100644 --- a/codelists/open/linkRelationType.csv +++ b/codelists/open/linkRelationType.csv @@ -1,5 +1,6 @@ code,title,description +describedby,Described by,Refers to the canonical JSON schema that describes the structure of the data. "tag:opentelecomdata.net,2022:nodesAPI",Nodes API,An API endpoint that returns a paginated list of `Node` objects. "tag:opentelecomdata.net,2022:nodesFile",Nodes file,A JSON Lines file containing one `Node` object per line. The file may be compressed using ZIP or GZIP. "tag:opentelecomdata.net,2022:spansAPI",Spans API,An API endpoint that returns a paginated list of `Span` objects. -"tag:opentelecomdata.net,2022:spansFile",Spans file,A JSON Lines file containing one `Span` object per line. The file may be compressed using ZIP or GZIP. +"tag:opentelecomdata.net,2022:spansFile",Spans file,A JSON Lines file containing one `Span` object per line. The file may be compressed using ZIP or GZIP. \ No newline at end of file diff --git a/examples/csv/links.csv b/examples/csv/links.csv new file mode 100644 index 0000000..f239346 --- /dev/null +++ b/examples/csv/links.csv @@ -0,0 +1,2 @@ +id,links/0/href,links/0/rel +a096d627-72e1-4f9b-b129-951b1737bff4,https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json,describedby diff --git a/examples/csv/nodes.csv b/examples/csv/nodes.csv index 8ee44e5..65474ca 100644 --- a/examples/csv/nodes.csv +++ b/examples/csv/nodes.csv @@ -1,3 +1,3 @@ id,nodes/0/id,nodes/0/name,nodes/0/phase/id,nodes/0/phase/name,nodes/0/status,nodes/0/location/type,nodes/0/location/coordinates,nodes/0/address/streetAddress,nodes/0/address/locality,nodes/0/address/region,nodes/0/address/postalCode,nodes/0/address/country,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider/id,nodes/0/physicalInfrastructureProvider/name,nodes/0/networkProvider/id,nodes/0/networkProvider/name a096d627-72e1-4f9b-b129-951b1737bff4,1,Accra,1,NextGen Phase 1,operational,Point,-0.174;5.625,Boundary Rd,Shiashie,Accra,12345,GH,pop,True,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb -a096d627-72e1-4f9b-b129-951b1737bff4,2,Kumasi,1,NextGen Phase 1,operational,Point,-1.628;6.711,Kejetia Road,Bantama,Kumasi,00000,GH,pop,True,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb +a096d627-72e1-4f9b-b129-951b1737bff4,2,Kumasi,1,NextGen Phase 1,operational,Point,-1.628;6.711,Kejetia Road,Bantama,Kumasi,00000,GH,pop,False,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb diff --git a/examples/csv/template/links.csv b/examples/csv/template/links.csv new file mode 100644 index 0000000..2c4c671 --- /dev/null +++ b/examples/csv/template/links.csv @@ -0,0 +1 @@ +id,links/0/href,links/0/rel diff --git a/examples/json/api-response.json b/examples/json/api-response.json index 0240b94..89d0bfc 100644 --- a/examples/json/api-response.json +++ b/examples/json/api-response.json @@ -2,11 +2,23 @@ "networks": [ { "id": "fd7b30d6-f514-4cd0-a5ac-29a774f53a43", - "name": "Ghana Fibre Network" + "name": "Ghana Fibre Network", + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } + ] }, { "id": "acafe566-7ffa-416a-b3b4-84a52386a586", - "name": "Togo Fibre Network" + "name": "Togo Fibre Network", + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } + ] } ], "links": { diff --git a/examples/json/multiple-networks.json b/examples/json/multiple-networks.json index 295e500..2e3a9c8 100644 --- a/examples/json/multiple-networks.json +++ b/examples/json/multiple-networks.json @@ -2,11 +2,23 @@ "networks": [ { "id": "fd7b30d6-f514-4cd0-a5ac-29a774f53a43", - "name": "Ghana Fibre Network" + "name": "Ghana Fibre Network", + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } + ] }, { "id": "acafe566-7ffa-416a-b3b4-84a52386a586", - "name": "Togo Fibre Network" + "name": "Togo Fibre Network", + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } + ] } ] } \ No newline at end of file diff --git a/examples/json/network-embedded.json b/examples/json/network-embedded.json index 101e042..e058f55 100644 --- a/examples/json/network-embedded.json +++ b/examples/json/network-embedded.json @@ -7,5 +7,11 @@ "spans": [ {}, {} + ], + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } ] } \ No newline at end of file diff --git a/examples/json/network-package.json b/examples/json/network-package.json index 972ff17..9ce1620 100644 --- a/examples/json/network-package.json +++ b/examples/json/network-package.json @@ -325,7 +325,13 @@ }, "accuracy": 250, "accuracyDetails": "Measured according to the US National Standard for Spatial Data Accuracy.", - "language": "en" + "language": "en", + "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + } + ] } ] } \ No newline at end of file diff --git a/examples/json/network-separate-endpoints.json b/examples/json/network-separate-endpoints.json index b15f24f..d70d895 100644 --- a/examples/json/network-separate-endpoints.json +++ b/examples/json/network-separate-endpoints.json @@ -4,6 +4,10 @@ "id": "a096d627-72e1-4f9b-b129-951b1737bff4", "name": "Ghana Fibre Network", "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + }, { "href": "http://example.com/networks/a096d627-72e1-4f9b-b129-951b1737bff4/nodes", "rel": "tag:opentelecomdata.net,2022:nodesAPI" diff --git a/examples/json/network-separate-files.json b/examples/json/network-separate-files.json index 8a26d73..fccea6c 100644 --- a/examples/json/network-separate-files.json +++ b/examples/json/network-separate-files.json @@ -4,6 +4,10 @@ "id": "a096d627-72e1-4f9b-b129-951b1737bff4", "name": "Ghana Fibre Network", "links": [ + { + "rel": "describedby", + "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + }, { "href": "http://example.com/networks/a096d627-72e1-4f9b-b129-951b1737bff4/nodes.jsonl", "rel": "tag:opentelecomdata.net,2022:nodesFile" diff --git a/schema/network-schema.csv b/schema/network-schema.csv index ed792b5..3a722f5 100644 --- a/schema/network-schema.csv +++ b/schema/network-schema.csv @@ -24,7 +24,7 @@ For more information, see how to format data for publication.",array,0..n,,https ,accuracy,Accuracy,"The horizontal uncertainty, in metres, of the coordinates in this dataset relative to the datum of the coordinate reference system specified in `crs`. Further details about the accuracy of coordinates in this dataset can be provided in `.accuracyDetails`.",number,0..1,,,,, ,accuracyDetails,Accuracy details,"Further details about the accuracy specified in `accuracy`. For example, the confidence level of the accuracy measurement, the methodology used to calculate the accuracy, or a local classification of accuracy.",string,0..1,,,,, ,language,Language,"The default language of this network,from the open language codelist. A BCP47 language tag is allowed, if there is a user need for the additional information.",string,0..1,,"https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#language, https://www.w3.org/International/articles/language-tags/",,,language.csv -,links,Links,Links to related resources such as API endpoints or bulk files for nodes and spans. Links to API endpoints should be provided when a network is too large to return in a single API response. Links to bulk files should be provided when a network is too large to load into memory.,array,0..n,,,,, +,links,Links,"Links to related resources. The links array must include a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see how to publish large networks.",array,1..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks,,, Node,id,Identifier,An identifier for this node. The identifier must be unique within the scope of the `nodes` array.,string,1..1,,,,, Node,name,Node name,A name for this node.,string,0..1,,,,, Node,phase,Phase,The phase to which this node belongs.,unknown,0..1,,,,, diff --git a/schema/network-schema.json b/schema/network-schema.json index ece9a78..d38c91f 100644 --- a/schema/network-schema.json +++ b/schema/network-schema.json @@ -5,7 +5,8 @@ "description": "A telecommunication network. A network consists of a set of nodes interconnected by spans.", "type": "object", "required": [ - "id" + "id", + "links" ], "properties": { "id": { @@ -134,12 +135,23 @@ }, "links": { "title": "Links", - "description": "Links to related resources such as API endpoints or bulk files for nodes and spans. Links to API endpoints should be provided when a network is too large to return in a single API response. Links to bulk files should be provided when a network is too large to load into memory.", + "description": "Links to related resources. The links array must include a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see [how to publish large networks](https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks).", "$comment": "https://github.com/Open-Telecoms-Data/open-fibre-data-standard/issues/75,https://github.com/Open-Telecoms-Data/open-fibre-data-standard/issues/83", "type": "array", "items": { "$ref": "#/definitions/Link" }, + "contains": { + "type": "object", + "properties": { + "href": { + "const": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + }, + "rel": { + "const": "describedby" + } + } + }, "minItems": 1, "uniqueItems": true } From 7326c7d48c3a3316764d77147a3c4a5064b6296a Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Thu, 27 Oct 2022 10:32:28 +1300 Subject: [PATCH 2/4] schema: Use tuple validation for links --- schema/network-schema.csv | 4 ++-- schema/network-schema.json | 33 +++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/schema/network-schema.csv b/schema/network-schema.csv index 3a722f5..6077aad 100644 --- a/schema/network-schema.csv +++ b/schema/network-schema.csv @@ -24,7 +24,7 @@ For more information, see how to format data for publication.",array,0..n,,https ,accuracy,Accuracy,"The horizontal uncertainty, in metres, of the coordinates in this dataset relative to the datum of the coordinate reference system specified in `crs`. Further details about the accuracy of coordinates in this dataset can be provided in `.accuracyDetails`.",number,0..1,,,,, ,accuracyDetails,Accuracy details,"Further details about the accuracy specified in `accuracy`. For example, the confidence level of the accuracy measurement, the methodology used to calculate the accuracy, or a local classification of accuracy.",string,0..1,,,,, ,language,Language,"The default language of this network,from the open language codelist. A BCP47 language tag is allowed, if there is a user need for the additional information.",string,0..1,,"https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#language, https://www.w3.org/International/articles/language-tags/",,,language.csv -,links,Links,"Links to related resources. The links array must include a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see how to publish large networks.",array,1..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks,,, +,links,Links,"Links to related resources. The first item in the links array must be a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see how to publish large networks.",array,1..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks,,, Node,id,Identifier,An identifier for this node. The identifier must be unique within the scope of the `nodes` array.,string,1..1,,,,, Node,name,Node name,A name for this node.,string,0..1,,,,, Node,phase,Phase,The phase to which this node belongs.,unknown,0..1,,,,, @@ -111,7 +111,7 @@ Identifier,uri,URI,"A canonical URI for this identifier, such as those provided CoordinateReferenceSystem,name,Name,The name of the coordinate reference system.,string,1..1,uri,,,, CoordinateReferenceSystem,uri,Uniform Resource Identifier,A URI for the coordinate reference system.,string,1..1,uri,,,, Link,href,Link target,The URL of this related resource.,string,1..1,iri,,,, -Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist.",string,1..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv +Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist. The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.",string,1..1,Pattern: (?!describedby).+,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv FibreTypeDetails,description,Description,A description of this span's fibre type.,string,0..1,,,,, DeploymentDetails,description,Description,A description of this span's deployment.,string,0..1,,,,, CapacityDetails,description,Description,A description of this span's capacity.,string,0..1,,,,, diff --git a/schema/network-schema.json b/schema/network-schema.json index d38c91f..ef32dd2 100644 --- a/schema/network-schema.json +++ b/schema/network-schema.json @@ -135,22 +135,26 @@ }, "links": { "title": "Links", - "description": "Links to related resources. The links array must include a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see [how to publish large networks](https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks).", + "description": "Links to related resources. The first item in the links array must be a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see [how to publish large networks](https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks).", "$comment": "https://github.com/Open-Telecoms-Data/open-fibre-data-standard/issues/75,https://github.com/Open-Telecoms-Data/open-fibre-data-standard/issues/83", "type": "array", - "items": { - "$ref": "#/definitions/Link" - }, - "contains": { - "type": "object", - "properties": { - "href": { - "const": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" - }, - "rel": { - "const": "describedby" + "prefixItems": [ + { + "type": "object", + "properties": { + "href": { + "type": "string", + "const": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" + }, + "rel": { + "type": "string", + "const": "describedby" + } } } + ], + "items": { + "$ref": "#/definitions/Link" }, "minItems": 1, "uniqueItems": true @@ -2057,12 +2061,13 @@ }, "rel": { "title": "Link relation type", - "description": "The relationship with this related resource, from the open [linkRelationType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype).", + "description": "The relationship with this related resource, from the open [linkRelationType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype). The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data." , "type": "string", "$comment": "", "codelist": "linkRelationType.csv", "openCodelist": true, - "minLength": 1 + "minLength": 1, + "pattern": "\b(?!describedby\b).+" } }, "required": [ From 39de5c0108af046a7e35a6f4858091a19b70bf84 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Tue, 1 Nov 2022 15:49:11 +1300 Subject: [PATCH 3/4] schema/network-schema.json: Update pattern regex for Link.rel --- schema/network-schema.csv | 34 +++++++++++++++++----------------- schema/network-schema.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/schema/network-schema.csv b/schema/network-schema.csv index 6159e29..00c62a3 100644 --- a/schema/network-schema.csv +++ b/schema/network-schema.csv @@ -1,17 +1,17 @@ section,path,title,description,type,range,values,links,deprecated,deprecationNotes,codelist ,id,Identifier,"A universally unique identifier for this network, as defined by RFC 4122. For more information, see the identifier reference.",string,1..1,uuid,"https://datatracker.ietf.org/doc/html/rfc4122, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/identifiers.html",,, ,name,Network name,A name for this network.,string,0..1,,,,, -,nodes,Nodes,"Information about the nodes that belong to this network. Information about nodes should be embedded in this field unless: - -* The network is too large to load in to memory, in which case a link to a streamable bulk nodes file may be provided in `.links` -* The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated nodes endpoint may be provided in `.links`. - +,nodes,Nodes,"Information about the nodes that belong to this network. Information about nodes should be embedded in this field unless: + +* The network is too large to load in to memory, in which case a link to a streamable bulk nodes file may be provided in `.links` +* The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated nodes endpoint may be provided in `.links`. + For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, -,spans,Spans,"Information about the spans that belong to this network. Information about spans should be embedded in this field unless: - -* The network is too large to load in to memory, in which case a link to a streamable bulk spans file may be provided in `.links` -* The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated spans endpoint may be provided in `.links`. - +,spans,Spans,"Information about the spans that belong to this network. Information about spans should be embedded in this field unless: + +* The network is too large to load in to memory, in which case a link to a streamable bulk spans file may be provided in `.links` +* The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated spans endpoint may be provided in `.links`. + For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, ,phases,Phases,Information about the phases in which this network is deployed.,array,0..n,,,,, ,organisations,Organisations,Information about the organisations involved in this network. Organisation references elsewhere in the schema are used to refer back to this entries in this list.,array,0..n,,,,, @@ -65,7 +65,7 @@ Span,countries,Countries,"The countries in which this span is physically located Phase,id,Identifier,An identifier for this phase. The identifier must be unique within the scope of the `phases` array.,string,1..1,,,,, Phase,name,Name,A name for this phase.,string,0..1,,,,, Phase,description,Description,A description for this phase.,string,0..1,,,,, -Phase,funders,Funders,"Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers. +Phase,funders,Funders,"Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers. ",array,0..n,,,,, Organisation,id,Local identifier,A local identifier for this organisation. The identifier must be unique within the scope of the `organisations` array.,string,1..1,,,,, Organisation,name,Name,A name for this organisation.,string,0..1,,,,, @@ -84,10 +84,10 @@ Contract,dateSigned,Date signed,The date this contract was signed.,string,0..1,d Contract,documents,Contract documents,The documents related to this contract.,array,0..n,,,,, Contract,relatedPhases,Related phases,The phases to which this contract relates.,array,0..n,,,,, Geometry,type,Type,"The GeoJSON geometry type that is described by `.coordinates`, from the closed geometryType codelist. This must be 'Point' when referenced by `Node.location`, and 'LineString' when referenced by `Span.route`.",string,1..1,"Enum: LineString, Point","https://datatracker.ietf.org/doc/html/rfc7946#section-1.4, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#geometryType",,,geometryType.csv -Geometry,coordinates,Coordinates,"One or more GeoJSON positions. For geometries of type 'Point', the coordinates member must be a single position. For geometries of type 'LineString' the coordinates member must be an array of positions. - -Each position is an array of numbers with two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order. Longitude and latitude must be expressed using the World Geodetic System 1984 WGS 84 datum in units of decimal degrees. Altitude or elevation may be included as an optional third element and must be expressed as the height in meters above or below the WGS 84 reference ellipsoid - +Geometry,coordinates,Coordinates,"One or more GeoJSON positions. For geometries of type 'Point', the coordinates member must be a single position. For geometries of type 'LineString' the coordinates member must be an array of positions. + +Each position is an array of numbers with two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order. Longitude and latitude must be expressed using the World Geodetic System 1984 WGS 84 datum in units of decimal degrees. Altitude or elevation may be included as an optional third element and must be expressed as the height in meters above or below the WGS 84 reference ellipsoid + Therefore, geometries of type 'Point' must be a single array, e.g. [longitude, latitude], and geometries of type 'LineString' must be an array of arrays, e.g. [[longitude, latitude], [longitude, latitude]].",array,1..n,,"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1, https://datatracker.ietf.org/doc/html/rfc7946#ref-WGS84",,, OrganisationReference,id,Local identifier,The local identifier of the organisation being referenced. This must match the `.id` of an organisation in the `organisations` array.,string,1..1,,,,, OrganisationReference,name,Name,The name of the organisation being referenced. This must match the `.name` of the organisation in the `organisations` array whose `.id` matches the `.id` of this organisation reference.,string,0..1,,,,, @@ -111,8 +111,8 @@ Identifier,uri,URI,"A canonical URI for this identifier, such as those provided CoordinateReferenceSystem,name,Name,The name of the coordinate reference system.,string,1..1,uri,,,, CoordinateReferenceSystem,uri,Uniform Resource Identifier,A URI for the coordinate reference system.,string,1..1,uri,,,, Link,href,Link target,The URL of this related resource.,string,1..1,iri,,,, -Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist. The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.",string,1..1,Pattern: (?!describedby).+,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv +Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist. The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.",string,1..1,Pattern: ^(?!(describedby)),https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv FibreTypeDetails,fibreSubtype,Fibre subtype,"The sub-category of the fibre type. For example, G.652.B.",string,0..1,,,,, FibreTypeDetails,description,Description,A description of this span's fibre type.,string,0..1,,,,, DeploymentDetails,description,Description,A description of this span's deployment.,string,0..1,,,,, -CapacityDetails,description,Description,A description of this span's capacity.,string,0..1,,,,, \ No newline at end of file +CapacityDetails,description,Description,A description of this span's capacity.,string,0..1,,,,, diff --git a/schema/network-schema.json b/schema/network-schema.json index 6aebdf5..54290fa 100644 --- a/schema/network-schema.json +++ b/schema/network-schema.json @@ -2067,7 +2067,7 @@ "codelist": "linkRelationType.csv", "openCodelist": true, "minLength": 1, - "pattern": "\b(?!describedby\b).+" + "pattern": "^(?!(describedby))" } }, "required": [ From 4c5dd4a25df579dbdbd35bc4f5dec73f014d7c21 Mon Sep 17 00:00:00 2001 From: Duncan Dewhurst Date: Tue, 1 Nov 2022 15:52:23 +1300 Subject: [PATCH 4/4] Update changelog --- docs/history/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/history/changelog.md b/docs/history/changelog.md index 57546e9..be0acd8 100644 --- a/docs/history/changelog.md +++ b/docs/history/changelog.md @@ -14,6 +14,7 @@ This page lists the changes in each version of the Open Fibre Data Standard. * [#144](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/144) - Clarify norms in the description of `links.start` and `links.end`. * [#154](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/154) - Rename links to spans, related resources to links and pages to links. * [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Correct erroneous reference in `Span.capacityDetails`. +* [#157](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/157) - Use `links` to identify the version of the standard that describes the structure of the data. ### Codelists