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

revert: reinstate stac_extensions schema definitions #65

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

dwsilk
Copy link
Member

@dwsilk dwsilk commented Sep 27, 2021

ref: eb3d494 (commit being reverted)
discussion: #60 (comment)
upstream issue: stac-extensions/template#10

These appear to be useful for checking that our own examples are correct, and to remain consistent with all of the JSON Schemas in the STAC community extensions.

If they are removed upstream / determined to no longer be needed, then a new PR and discussion can be created.

@dwsilk dwsilk requested review from blacha and l0b0 September 27, 2021 00:32
@l0b0

This comment has been minimized.

Copy link
Contributor

@l0b0 l0b0 left a comment

Choose a reason for hiding this comment

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

How do we test this? It can't be tested on the extensions themselves. We'd have to create a separate dummy extension for each extension, referencing the extension under test, then create a JSON document which references the dummy extension and verify that it fails validation.

Update: I've changed my mind. My initial thinking was that the STAC metadata file would tell the JSON validator which schema to validate against. But it's also possible for the JSON validator caller to tell it which schema to use, independently of the contents of the STAC file. Since the schema reference in this case is outside of the STAC file it makes sense to enforce the contents of the STAC file this way.

Unfortunately I don't think we can test this with the current stac-node-validator, because it only looks at the contents of the STAC files to determine which schemas to validate against.

@dwsilk dwsilk added the automerge kodiak automerge label label Oct 3, 2021
@kodiakhq kodiakhq bot merged commit 7418626 into master Oct 3, 2021
@kodiakhq kodiakhq bot deleted the revert/stac-extensions-schema branch October 3, 2021 22:59
@blacha
Copy link
Member

blacha commented Oct 3, 2021

Unfortunately I don't think we can test this with the current stac-node-validator, because it only looks at the contents of the STAC files to determine which schemas to validate against.

The unit tests @MitchellPaff wrote could be used to validate this.

@l0b0
Copy link
Contributor

l0b0 commented Oct 3, 2021

Unfortunately I don't think we can test this with the current stac-node-validator, because it only looks at the contents of the STAC files to determine which schemas to validate against.

The unit tests @MitchellPaff wrote could be used to validate this.

That's a good point! Created #79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge kodiak automerge label
Development

Successfully merging this pull request may close these issues.

3 participants