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

Handle remaining keywords when merging schemas #15

Closed
Zac-HD opened this issue Jun 13, 2019 · 2 comments
Closed

Handle remaining keywords when merging schemas #15

Zac-HD opened this issue Jun 13, 2019 · 2 comments
Labels
good first issue Good for newcomers

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Jun 13, 2019

https://github.com/Zac-HD/hypothesis-jsonschema/blob/c16b93bde5616fa4ecbe2808d7ba9fe7a221faf4/src/hypothesis_jsonschema/_canonicalise.py#L408-L420

The merged(schemas) function outputs a single schema which matches all and only instances matched by all of the input schemas, or None if there is no such schema (without e.g. allOf).

This issue will be closed when merged() understands how to merge all keywords defined in the spec that can in principle be merged. This includes e.g. maximum (take the min), but not contains (at least one array item valid against each)

@Zac-HD Zac-HD changed the title Handle remaining cases when merging schemas Handle remaining keywords when merging schemas Dec 24, 2019
@Zac-HD
Copy link
Member Author

Zac-HD commented May 12, 2020

  • multipleOf - calculate least common multiple of integer-valued arguments. Non-integer values are not going to be supported though, I don't want to think about the floating-point issues.
  • uniqueItems - make canonicalish drop "uniqueItems": false from schemas and the existing merge logic will be sufficient.

In both cases we'll be able to merge schemas that we couldn't before, and test appropriately. And that's the last two keywords!

@Zac-HD
Copy link
Member Author

Zac-HD commented May 20, 2020

Closed by #44.

@Zac-HD Zac-HD closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant