Skip to content

Conversation

@mojodna
Copy link
Collaborator

@mojodna mojodna commented Nov 21, 2018

This updates the JSON schemas to draft-07.

From http://json-schema.org/draft-07/json-schema-release-notes.html:

For the Core and Validation specifications, draft-07 is a relatively minor update. In terms of validation keywords and outcomes, it is fully backwards-compatible with draft-06.

GeoJSON Features are directly addressable (for validators that resolve external URLs). I think stac-validator will 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$id change was recommended) in STAC Browser (it validates behind the scenes and logs warnings to the JS console):

radiantearth/stac-browser@5b42b6b

loadSchema was what was needed there to resolve remote schema $refs (and why it didn't work using ajv-cli on the command line).

@mojodna
Copy link
Collaborator Author

mojodna commented Dec 13, 2018

@jbants does this work with STAClint?

@mojodna
Copy link
Collaborator Author

mojodna commented Dec 18, 2018

@brianbancroft looks like this might be up your alley?

@jbants
Copy link
Contributor

jbants commented Dec 19, 2018

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

@brianbancroft
Copy link
Contributor

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

@m-mohr
Copy link
Collaborator

m-mohr commented Jan 3, 2019

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.

@mojodna
Copy link
Collaborator Author

mojodna commented Jan 3, 2019

Good call. I'll take that on soon.

Copy link
Collaborator

@m-mohr m-mohr left a 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.

  1. Resolving conflicts
  2. Updating recently added schemes to also follow draft 7, such as the SAR JSON schema in #393
  3. Remove the JS (ajv) validation from the README

@m-mohr m-mohr added this to the 0.6.2 milestone Feb 25, 2019
@mojodna mojodna force-pushed the json-schema-draft-07 branch from 542d419 to 9768913 Compare March 5, 2019 17:12
@mojodna mojodna requested a review from m-mohr March 5, 2019 17:12
Copy link
Contributor

@cholmes cholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@cholmes cholmes merged commit 7dac6c3 into radiantearth:dev Mar 5, 2019
@mojodna mojodna deleted the json-schema-draft-07 branch March 5, 2019 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants