Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/reference/publication_formats/json.md: Fix broken schema browser #184

Merged
merged 19 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ Welcome to the GitHub repository for the Open Fibre Data Standard.

## Contributing

To contribute to the development of the standard, check out the [discussion tracker](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions).
To contribute to the development of the standard, check out the [discussion tracker](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions). To facilitate discussions, we have prepared a number of [consultation topics](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions/categories/consultation-topics) with accompanying documents to act as starting points for discussion. These are:
* Data stewardship, publication formats and access methods | [Document](https://docs.google.com/document/d/1ZDx69xTU7fjGP-6WRYV2FpGreGRk4JQlpkubObf6q2c/edit#heading=h.1qzjnvoo169a) | [Discussion](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions/3)
* Demand side research: Use cases | [Document](https://docs.google.com/document/d/1ignwppM9d3CqKSbeMz-_fLg5dmhKSm5w43SvsGDfeQc/edit#heading=h.o0gouj4ezdu3) | [Discussion](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions/4)
* Supply side research: Common concepts and standardisation | [Document](https://docs.google.com/document/d/1YV_clpGNojmQTtwhAZJTAVLq7xXDU0K9ypK0ZdyWsNw/edit) | [Discussion](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions/5)
* Conceptual model | [Document](https://docs.google.com/document/d/1lEaoUmGr9RATMo_wuM9hLF2oOu22bh_M03JiPXbj-Iw/edit#heading=h.8t7oceczb459) | [Discussion](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/discussions/22)


## Background

Expand Down
9 changes: 9 additions & 0 deletions docs/history/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ To comment on or create discussions and issues, you need to [sign up for a free
```
This page lists the changes in each version of the Open Fibre Data Standard.

## Iterative improvements

Iterative improvements are made outside of the release cycle. They do not involve changes to normative content. For more information, see [normative and non-normative content](../governance/index.md#normative-and-non-normative-content).

* [#184](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/184) - Fix broken schema browser.

## 0.1.0-beta - 2022-11-10

### Schema
Expand Down Expand Up @@ -49,6 +55,9 @@ This page lists the changes in each version of the Open Fibre Data Standard.
* Update GeoJSON examples.
* Remove unused blank JSON example.
* [#168](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/168) - Update release and issue admonitions.
* [#177](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/177):
* Add an invalid network package that fails validation against an instance of each validation keyword, type and format used in the schema
* Add a network package that does not conform to each normative rule that is not encoded in the schema
* [#180](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/180) - Update release admonition, fix notebook viewer link, fix links in Leaflet notebook.

### Build
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/publication_formats/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ A network package is a JSON object that must include `.networks`: an array of `N
:::{tab-item} Schema browser
Click on schema elements to expand the tree, or use the '+' icon to expand all elements. Use { } to view the underlying schema for any section. Required fields are indicated in **bold**.

<script src="../_static/docson/widget.js" data-schema="../network-package-schema.json"></script>
<script src="../../_static/docson/widget.js" data-schema="../network-package-schema.json"></script>
:::

:::{tab-item} Small file example
Expand Down
129 changes: 129 additions & 0 deletions examples/json/network-package-additional-checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"networks": [
{
"id": "a096d627-72e1-4f9b-b129-951b1737bff4",
"spans": [
{
"id": "1",
"start": "Accra",
"end": "Kumasi",
"route": {
"type": "Point",
"coordinates": [
0,
0
]
},
"phase": {
"id": "Phase 1"
},
"physicalInfrastructureProvider": {
"id": "FibreCo"
},
"networkProvider": {
"id": "FibreCo"
},
"supplier": {
"id": "ProjectCo"
}
},
{
"id": "1"
}
],
"nodes": [
{
"id": "1",
"location": {
"type": "LineString",
"coordinates": [
[
0,
0
],
[
0,
0
]
]
},
"phase": {
"id": "Phase 1"
},
"physicalInfrastructureProvider": {
"id": "FibreCo"
},
"networkProvider": {
"id": "FibreCo"
},
"internationalConnections": [
{
"streetAddress": "Togo"
}
]
},
{
"id": "1"
}
],
"contracts": [
{
"id": "1",
"relatedPhases": [
{
"id": "Phase 1"
},
{
"id": "1",
"name": "Phase 2"
}
]
},
{
"id": "1"
}
],
"phases": [
{
"id": "1",
"name": "Phase 1",
"funders": [
{
"id": "Ghana Infrastructure Investment Fund"
},
{
"id": "1",
"name": "Investment Fund"
}
]
},
{
"id": "1"
}
],
"organisations": [
{
"id": "1",
"name": "Ghana Infrastructure Investment Fund"
},
{
"id": "1"
}
],
"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"
},
{
"href": "http://example.com/networks/a096d627-72e1-4f9b-b129-951b1737bff4/spans",
"rel": "tag:opentelecomdata.net,2022:spansAPI"
}
]
}
]
}
52 changes: 52 additions & 0 deletions examples/json/network-package-invalid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"networks": [
{
"id": "1",
"name": "",
"nodes": [],
"spans": [
{
"status": "open",
"route": {
"type": "LineString",
"properties": ""
},
"transmissionMedium": ["cable"],
"directed": "yes",
"fibreCount": "52"
}
],
"phases": [
{
"id": "1"
},
{
"id": "1"
}
],
"contracts": {},
"organisations": [
{}
],
"publicationDate": "January",
"website": "example.com",
"crs": {
"name": "WGS84",
"uri": "www.opengis.net/def/crs/OGC/1.3/CRS84"
},
"accuracy": "medium",
"accuracyDetails": 100,
"publisher": "FibreCo",
"links": [
{
"href": "http://example.com/networks/a096d627-72e1-4f9b-b129-951b1737bff4/nodes",
"rel": "tag:opentelecomdata.net,2022:nodesAPI"
},
{
"href": "http://example.com/schema.json",
"rel": "describedby"
}
]
}
]
}
8 changes: 8 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
- [ ] `api-response.geojson`
- [ ] `multiple-networks.geojson`
- [ ] Run `./manage.py pre-commit` to update derivative schema files, reference documentation and examples
- [ ] If you used a validation keyword, type or format that is not [already used in the schema](https://ofds-standard-development-handbook.readthedocs.io/en/latest/standard/schema.html#json-schema-usage):
- [ ] Update the list of validation keywords, types or formats in [JSON Schema usage](https://ofds-standard-development-handbook.readthedocs.io/en/latest/standard/schema.html#json-schema-usage).
- [ ] Add a field that fails validation against the new keyword, type or format to [`network-package-invalid.json`](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/blob/0.1-dev/examples/json/network-package-invalid.json).
- [ ] Check that [OFDS CoVE](https://ofds.cove.opendataservices.coop/) reports an appropriate validation error.
- [ ] If you added a normative rule that is not encoded in JSON Schema:
- [ ] Update the list of [other normative rules](https://ofds-standard-development-handbook.readthedocs.io/en/latest/standard/schema.html#other-normative-rules).
- [ ] Add a field that does not conform to the rule to [`network-package-additional-checks.json`](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/blob/0.1-dev/examples/json/network-package-additional-checks.json).
- [ ] Open a [new issue](https://github.com/Open-Telecoms-Data/lib-cove-ofds/issues/new/choose) to add an additional check to Lib Cove OFDS.
- [ ] If there are changes to `examples/geojson/nodes.geojson` or `examples/geojson/spans.geojson`, check and update the data use examples:
- [ ] `examples/leaflet/leaflet.ipynb`
- [ ] `examples/qgis/geojson.qgs`
Expand Down