-
Notifications
You must be signed in to change notification settings - Fork 189
JSON Schema draft-07 #360
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
JSON Schema draft-07 #360
Conversation
|
@jbants does this work with STAClint? |
|
@brianbancroft looks like this might be up your alley? |
|
Hey @mojodna, im out travelling in India until mid January. Brian is going to have a look. Off the top of my head I think the JSON spec library we are using supports 7. But we will test it out to confirm |
|
Hello @mojodna and @jbants, and sorry for the delayed response. I confirm that the json spec library used by Sparkgeo's library does support draft 7 out of the box. The following are the relevant docs on the library which we use: https://python-jsonschema.readthedocs.io/en/latest/validate/#jsonschema.Draft4Validator |
|
This change will let the JavaScript Validator fail for mostly all requests (can't resolve external references), so we should remove the instructions for it with this PR, too. |
|
Good call. I'll take that on soon. |
m-mohr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs some work.
- Resolving conflicts
- Updating recently added schemes to also follow draft 7, such as the SAR JSON schema in #393
- Remove the JS (ajv) validation from the README
Somewhere along the line, `id` also changed to `$id`.
542d419 to
9768913
Compare
cholmes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
This updates the JSON schemas to draft-07.
From http://json-schema.org/draft-07/json-schema-release-notes.html:
GeoJSON
Features are directly addressable (for validators that resolve external URLs). I thinkstac-validatorwill handle this, but can't check due to stac-utils/stac-validator#27.I've got this working with ajv (which is where the
id→$idchange was recommended) in STAC Browser (it validates behind the scenes and logs warnings to the JS console):radiantearth/stac-browser@5b42b6b
loadSchemawas what was needed there to resolve remote schema$refs (and why it didn't work usingajv-clion the command line).