-
-
Notifications
You must be signed in to change notification settings - Fork 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
karate : Complex JSON Schema matching #346
Comments
able to replicate with this example: Background:
* def json =
"""
{
"foo": {
"bars": [
{ "barOne": "dc", "barTwos": [] },
{ "barOne": "dc", "barTwos": [{ title: 'blah' }] },
{ "barOne": "dc", "barTwos": [{ title: 'blah' }], barThrees: [] },
{ "barOne": "dc", "barTwos": [{ title: 'blah' }], barThrees: [{ num: 1 }] }
]
}
}
"""
* def barTwo = { title: '#string' }
* def barThree = { num: '#number' }
* def bar = { barOne: '#string', barTwos: '#[] barTwo', barThrees: '##[] barThree' }
Scenario:
* match json.foo.bars == '#[] bar' |
@avyasbms thanks a lot for finding this, it is fixed in dev. if you can build and run from source, do verify - else we can release a 0.7.0.2 shortly. |
Waiting for 0.7.0.2 to verify. |
@ptrthomas Can you let me know how to verify? |
@avyasbms sorry, I should have done this earlier, but somehow thought you had a workaround. I just released 0.7.0.2 - can you confirm that it works ? |
Hey @ptrthomas It seems to be working. I'll check more cases and will confirm. Thanks a lot. |
Confirming that it worked for many other cases as well. Thanks again! |
thanks @avyasbms I'll just keep this open pending the official 0.8.0 release |
released 0.8.0 |
Hi @ptrthomas, the bug is again reproducible in 1.4.1.RC3. Please see this stackoverflow question for details: https://stackoverflow.com/questions/77125005/karate-complex-json-schema-validation-does-not-work-as-expected I'm unaware of the process around reopening issues, so please suggest. |
@roma-shukla-wcq there is some discussion in #2364 which I think is related to your issue, this may need more changes |
In Above Example , Schema matching doesn't seems to be working as expected. Need to match full JSON schema.
Reference: https://stackoverflow.com/questions/49231115/karate-complex-json-schema-matching
The text was updated successfully, but these errors were encountered: