-
Notifications
You must be signed in to change notification settings - Fork 355
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
bug: anyOf / oneOf with objects and default values #711
Comments
Note that order is important: if input value is 'a', it's working as expected
|
With oneOf
valid but "bDefault" shouldn't be populated. |
With oneOf, different order
result should be valid and { "b": 2, "bDefault": 2} |
@kroc702 thanks for the extensive information. I’ll see what I can find from te above or did you already did some debugging and perhaps and close to a PR? One question I still have is which version of this library are you using? As that would be very informative in the context of this bug. |
I forget to mention version:
And no I didn't debug this code yet. I'll add info here if I take the time to do it. |
Hello,
When mixing several objects with anyOf or oneOf, default values may be wrongly applied and interfere the validation.
Cf attached file for a simple use case that where used.
testSchemaValidator.zip
Here a first output example:
result should be valid and { "b": 2, "bDefault": 2}
The text was updated successfully, but these errors were encountered: