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

Proposal: Non-conformant examples #9

Closed
l0b0 opened this issue Sep 15, 2021 · 2 comments · May be fixed by #13
Closed

Proposal: Non-conformant examples #9

l0b0 opened this issue Sep 15, 2021 · 2 comments · May be fixed by #13

Comments

@l0b0
Copy link
Contributor

l0b0 commented Sep 15, 2021

Rationale:

This repo currently tests that each of the example JSON files are valid. Verifying that non-conformant examples are in fact not valid would improve the quality of extensions in several ways:

  • It would allow testing limits such as maximum length.
  • It would allow testing types such as putting a string value where an integer is expected.
  • It could help end users which are not JSON Schema experts to understand the extension better.

Some considerations:

  • Should not introduce a lot of extra complexity, so we should probably reuse the current testing mechanism and language.
  • Should be easily ignored in the repo, so it should probably be in a separate directory like "non-examples".

I'm currently working in a group which is considering how to do this in our STAC extensions, but I'd be interested to hear your opinions and whether you'd be interested in upstreaming such a change.

@m-mohr
Copy link
Contributor

m-mohr commented Oct 8, 2021

We need to ensure that this does not get confused with working examples. Also, I'm not sure this should be in the specification repos (depends a bit on how the examples look like) and I'm wondering whether it would make sense to keep them separate? It sounds more like a "test suite".

Anyway, we are happy to accept PRs but don't have the capacity right now to work on it ourselves.

@l0b0
Copy link
Contributor Author

l0b0 commented Nov 1, 2021

I've gone for a unit test approach instead - see the attached PR.

@m-mohr m-mohr closed this as completed Nov 1, 2021
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 a pull request may close this issue.

2 participants