Open danascheider opened 8 years ago
Can you provide example data which is falsely validated against this schema?
I actually can't, the code that I was having this problem with is in my former employer's private repo. Sorry about that.
No problem, maybe we can reconstruct an example. If its just because of the data I see a fair chance. But if it depends on a certain combination of flags, well then possibly not (I rather suspect that though, otherwise there probably would have been issue(s) already).
Can you remember anything about the properties of wrongly accepted data? Where there any additional properties which have been accepted although they shouldn't or was it the other way around that data with missing required attributes got accepted?
Let me see what I can come up with, I have some work to get done but I can take a look at it later today.
Summary
The validator is saying a response body matches a schema when it actually doesn't. The schema contains a
oneOf
key with refs andadditionalProperties
set tofalse
.Current Behavior
The response body is falsely passing the validation. This is the schema:
The response I'm getting is:
Expected Behavior
The response body above should not pass validation against the given schema.
Additional Details
oneOf
schemas haveadditionalProperties
set to falseoneOf
schemas both specify required properties that are not present in the actual bodyrequired
on the main schema (since the two possible schemas have the same keys) does not change the behavior"additionalProperties": false
on just the main schema or just theoneOf
schemas does not change the behavior