-
-
Notifications
You must be signed in to change notification settings - Fork 215
Test that oneOf handles missing optional property #307
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
Comments
Yikes, that's concerning! |
@Relequestual You are correct, the added property could be simplified as
|
Which of the tests does it fail? all of them? |
Oh, in my example I've taken the existing test in oneOf.json with the description "oneOf complex types" and augmented it. Maybe it should be its own test. The library fails test 1 and 3, |
Ugh, sorry for having double standards on test naming... Out of interest, what does the library do with the following?: |
Was the bug in that library really rooted in something oneOf specific? No
simpler schema exercised it?
…On Tue, Nov 19, 2019, 10:48 Ben Hutton ***@***.***> wrote:
Ugh, sorry for having double standards on test naming...
We should probably have better names for our tests...
Out of interest, what does the library do with the following:
https://jsonschema.dev/s/N4IgziBcLAOgdgAkbE8D2AXVlFyciiAA4BO6xApqZgJaVg54KGGoBGAhqU-q66kwBPKk1S14mSgHNqqFvwC+AGgUCQXAF681-QSMpiN6dABtKnePIKtFulbtSlKARwCutZwBMmAbV3IHNzWrAC6CnbwiiDKILRQMApB2lCIAEwI0YpAA
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#307?email_source=notifications&email_token=AACQQXUYNBMKGVXUUE534CLQUQDEXA5CNFSM4JPEJSRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEOU4YY#issuecomment-555568739>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQQXXRHJT3KL3YKGICNDTQUQDEXANCNFSM4JPEJSRA>
.
|
@Relequestual The library succeeds in validating your example. @Julian The bug stems from the fact that the validator, if a property is missing, checks and reacts to whether it is a "complex validator" (allOf/anyOf/oneOf) before checking if the property is required. |
Got it -- well, fair enough, if it's a bug that happened in the wild it's something we always have added -- happy to see a PR adding a new test for these -- do you think you'd have time to send one? |
Can you just make sure to mention the downstream issue in either or both of the test case name or the commit message? |
@aznan2 Julian said what I was trying to allude to. |
Sure. Would you prefer if I modify the existing "complex types" test or should this be a new test case? |
It should be new
…On Thu, Nov 21, 2019, 03:30 aznan2 ***@***.***> wrote:
Sure. Would you prefer if I modify the existing "complex types" test or
should this be a new test case?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#307?email_source=notifications&email_token=AACQQXS3NDCTIB6CR4N3YBDQUZBJHA5CNFSM4JPEJSRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEZMKMQ#issuecomment-556975410>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQQXUJKTJFTVBXRAIR4VDQUZBJHANCNFSM4JPEJSRA>
.
|
Created the PR #308 |
Ugh. Can you guys fill me in on why my PR is breaking the build? |
Sorry, it's too early in the morning clearly for me to be responding to issues. Scratch the above, it isn't related to #238, but is you using a boolean schema in the draft 4 folder which draft4 didn't have those -- so you do need to use |
Yay, thank you! |
issue #307 - test that oneOf handles missing optional property
This shouldn't really be necessary, but at least one validation library fails this test.
The text was updated successfully, but these errors were encountered: