Feature/any of support#155
Merged
AlexanderMann merged 20 commits intodatamill-co:masterfrom Jan 28, 2020
Merged
Conversation
…ssibly many types for literals
c2dbcb6 to
d362775
Compare
Fix some json schema tests
d362775 to
0510bd9
Compare
awm33
reviewed
Jan 21, 2020
|
|
||
| def _comparator(self): | ||
| if not self._c: | ||
| self._c = json.dumps(self, sort_keys=True) |
Collaborator
Author
There was a problem hiding this comment.
Yeah, but just once and only on schema messages (at least should be). The reason for having this is so that this doesn't get run all the time.
|
|
||
| def test__anyOf__schema__stitch_date_times(): | ||
| denested = error_check_denest( | ||
| {'properties': { |
awm33
approved these changes
Jan 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#14
This pr seeks to add full support for
anyOftoTarget-Postgres.anyOfclauses are merged/simplified according to the following rules (these are recursive):anyOfschemasitemsschemas are merged as simplifiedanyOfschemasanyOfs are flattened to the topmostanyOf, that is denestedanyOfs are nullable, all are nullableWe also simplify "implicit"
anyOfs. These are the literal schemas where thetypefield is overloaded with multiple types. ie, something like"type": ["string", "integer"]