-
Notifications
You must be signed in to change notification settings - Fork 356
CHECK_MODE_APPLY_DEFAULTS uses defaults from first "oneOf"|"anyOf" option rather than the one that validates #510
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This one has hit me very hard too :-) After a couple of hours I found this report and I can confirm the incorrect behaviour. |
I stumbled upon this today in v5.3.0 and did some debugging: The reason this happens is that here, One way to resolve this would be to deep-copy I think a similar problem occurs with allOf as well as anyOf. All of these contain a foreach that goes through all of the cases, but potentially alters Also, #711 is likely to be caused by the same problem. I'm mentioning @DannyvdSluijs, as you seem to be the maintainer of this project. |
…nly check_mode_apply_defaults is set #510
Background
CHECK_MODE_APPLY_DEFAULTS
uses defaults from first "oneOf" option rather than the one that validates. The same has been observed with "anyOf", but the test uses "oneOf"Test
expected output
actual output
getErrors() output
yields
The text was updated successfully, but these errors were encountered: