-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
oneOf doesn't work with objects #3742
Comments
@gabor-meresz-epam Even AJV believes that this is not a valid schema. Have you tried something like this playground instead? |
Hi @heath-freenome , sorry I get 404 on the link you provided actually, we got that if the oneOf contains an object, then after changing the Option - the validation fails always |
Sorry the link you provided is broken (404) The schema looks valid for me, I tried out with https://www.jsonschemavalidator.net/ |
@heath-freenome did you have a chance to check the replies? |
@gabor-meresz-epam Sorry, it's been a busy week at work. I'm trying to figure out what the example I sent was and why the link is broken |
Here's the proper Playground link |
hi, @heath-freenome thanks for the new link, it's working now - and it does not give error, but :) |
Can you share the playground link for the situation you are describing? You can use the Share button and paste what is put into your clipboard |
hi, @heath-freenome , sure - but it's really only that one line |
The discriminator provides a performance increase with the oneOf computations |
hi, @heath-freenome, back to the original issue: could you reproduce the error from the playground link provided? |
@tamas-grosz-epam I could when I removed the |
Hi, @heath-freenome - maybe I didn't notice something, but your link seems to be the same as the first one. |
The link is different, not in the schema, but in the options, specifically the |
Hi, sorry for the late reaction. We introduced and tested your idea, it works. This issue may be closed, still I'd prefer to keep it and convert to show that the setting is incompatible with the oneOf part |
@tamas-grosz-epam I don't understand your comment. Perhaps you could either update this issue or write a new one with a more specific cause/effect bug for the incompatible |
With your suggestion to change Object fields default behavior option - it works. But without changing it, it does not - that's what I mean incompatible |
Ah... Well we provide the options on |
Yeah, I'd flag this issue solved and add a line in documentation that if oneOf is needed, then use only the working option |
This issue was closed because of lack of recent activity. Reopen if you still need assistance. |
Prerequisites
What theme are you using?
core
Version
5.x
Current Behavior
The form shows wrong error messages in case the schema contains oneOf with objects inside and the user changes between the available options.
The unexpected errors:
Expected Behavior
The form should work fine with all kinds of oneOf schemas.
Steps To Reproduce
Environment
Anything else?
The text was updated successfully, but these errors were encountered: