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

schema/network-schema.json: Disallow additional properties in Geometry #274

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

duncandewhurst
Copy link
Collaborator

@duncandewhurst duncandewhurst commented Jun 21, 2023

Related issues

Description

This PR relates to an issue that surfaced whilst updating tooling for version 0.3:

Following #262, WKT is used to represent Geometry objects in the CSV publication format. WKT does not support additional properties so in order to prevent undefined behaviour and to support roundtripping without data loss, we need to disallow additional properties in the Geometry object. Certain property names (properties and features) were already prohibited, per the GeoJSON specification. Given that there are not yet any implementations and given that we've heard no demand for additional properties within Geometry objects, I think this change is fine to make.

Merge checklist

  • Update the changelog (style guide)
  • 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:

  • Update the list of validation keywords, types or formats in JSON Schema usage.
  • Add a field that fails validation against the new keyword, type or format to network-package-invalid.json. (existing file is sufficient)
  • Check that OFDS CoVE reports an appropriate validation error.

@duncandewhurst
Copy link
Collaborator Author

  • Check that OFDS CoVE reports an appropriate validation error.

@odscjames, contrary to what I said about no more schema changes, this PR does make a change to the schema that will need to be reflected in CoVE. Are you able to spin up a dev instance with the updated schema so that we can check how it handles the additionalProperties keyword?

@duncandewhurst duncandewhurst requested a review from Bjwebb June 21, 2023 22:44
@duncandewhurst
Copy link
Collaborator Author

@Bjwebb you can ignore the link check failure. It will be resolved once the 0.3 release is tagged.

@Bjwebb Bjwebb merged commit ed8a68a into 0.3-dev Jun 23, 2023
@Bjwebb Bjwebb deleted the disallow-additional-geometry-properties branch June 23, 2023 11:33
@ghost
Copy link

ghost commented Jun 23, 2023

This has been released in libcoveofds 0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants