-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow omitting type and infer it when validating #164
Conversation
5530096
to
51c4af9
Compare
@phadej I have rebased, so it should probably be fine for merge now 😊 |
51c4af9
to
7d8bbfc
Compare
@phadej A gentle reminder about this, whenever you get the time 😸 |
@phadej |
@phadej ping! 😄 |
Merged. But I don't know when I'll have proper time to make the release (it's including major bump, so one would like to use that opportunity to merge other breaking stuff) |
Ok. I accidentally removed the inferring when rebasing #163, and none of the tests failed. I.e. there are no tests. Reverting this until there are. |
@kahlil29 Specifically I don't see any test where |
This fixes #138.
For type inference I use the same algorithm as in https://github.com/json-schema-faker/json-schema-faker#inferred-types:
Note that this is a breaking change:
type_ .~ ...
totype ?~ ...
mempty :: Schema
is now with implicit type (wasSwaggerString
before).This PR supersedes #163 (that one used a different inference mechanism).