-
-
Notifications
You must be signed in to change notification settings - Fork 111
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 filter #174
Comments
I see no one responded to the above query. By any chance were you able to figure out what was the issue? I am currently working on a conditional validation of sub-schemas and would like to be aware of any issues/observations around oneOf, as I would certainly be using it for my use case. Thanks |
I don't think any matches. Your object has a bar that matches the bar in the first schema in the oneOf, but has a baz that matches the baz sub-schema in the second schema in the oneOf. E.g., either of these should work: { bar: { a: [1] }, baz: { z: {} } } or { bar: { a: [1], b: [1]}, baz: { y: {} }} |
If all you care is validating with
I know the object doesn't match the schema, in fact I purposefully made it so to test the |
If I'm understanding how filter works, you'd have to first match a schema. Because you're not, there's nothing to filter. So, the filter does seem to be taking into account the oneOf -- but the result is "filter based on (no schema)" --> i.e., filter nothing. Make sense? |
Not quite sure. But if what you say is you need to match the schema to filter, then what is the purpose of filter? If I understand correctly, filter is to strip out properties that does not match the schema. Under normal circumstances that is the case. But why not If |
A question regarding
oneOf
infilter
operation.Given the example
It seems that filter ignores the
oneOf
completely.Is this an expected behaviour?
The text was updated successfully, but these errors were encountered: