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

Should we say "name" is an errata and do an update? #121

Closed
jolla56 opened this issue Dec 9, 2021 · 3 comments
Closed

Should we say "name" is an errata and do an update? #121

jolla56 opened this issue Dec 9, 2021 · 3 comments

Comments

@jolla56
Copy link
Contributor

jolla56 commented Dec 9, 2021

No description provided.

@bquinn
Copy link
Contributor

bquinn commented Dec 9, 2021

Good idea to raise this as an issue.

It's worth noting that fixing this is required for schemastore integration. As part of the submission process, schemastore validates the schema against the named JSON schema "metaschema" and "name" is not a valid property in JSON Schema draft-04 (or any other version that we can find)

Background: we added "name" as a property so that the protobuf compiler would work. It is required by the JSON Schema-to-protobufs compiler that we use (https://github.com/Army-U/jsonschema-protobuf/). If "name" is not included then the overall message is called "undefined". But then again we have to edit the generated protobufs schema anyway to add enums etc, so maybe it's not a problem.

@jolla56
Copy link
Contributor Author

jolla56 commented Dec 13, 2021

We are ok with an errata. Check the proceedings with Brendan and/or Paul.

In the longer term we should ask the protobuf people and json schema people to agree.

@bquinn
Copy link
Contributor

bquinn commented Feb 7, 2022

Update on this, because we've discussed it on our calls but we haven't put it in writing:

  • I have discovered that technically "name" isn't wrong, our ninjs 2.0 schema is valid against the JSON Schema draft 4, 6, 7, and 2019 drafts
  • SchemaStore allows us to ignore certain properties during validation, so we can get it to accept the property and upload it to SchemaStore without changing the schema.
  • We had other problems with SchemaStore because the $ref for geojson wasn't working. @iyoung worked out that we can get it working if we add a $id to the geojson schema. Whether the SchemaStore people will accept that change is another question.
  • Writing some test cases for SchemaStore has shown that we might need an update to our schema anyway, because it looks like the geo properties don't actually validate against the geojson schema properly. We will raise a separate issue for that.

@jolla56 jolla56 closed this as completed May 16, 2022
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

No branches or pull requests

2 participants