Complex JSON Schema Validation Fail
See original GitHub issueHello,
I have observed JSONSchema validation for complex object when object is inside an Array is not working as expected. Validation of objects inside arrays are ignored by validation library.
I used attached JSON schema and register them in APICurio. On validating below data, validation is successful which is supposed to fail as zipCode is string and expected to be integer.
{
"firstName":"568dfa8d-2cd9-473e-acb5-9be84382a74b",
"lastName":"6635e20a-7be7-4b96-a5bc-c13fa57a4a04",
"age":20,
"city":[{"name":"573f459c-0aa4-4338-9821-60a04260cc7e","zipCode":"12345"}]
}
I sent the below data
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:16 (9 by maintainers)
Top Results From Across the Web
How to validate the json against a complex json schema ...
When I give data as follows I am expecting error that cropLocation doesnt have state and country prperty. but it validates as success...
Read more >A Vocabulary for Structural Validation of JSON - JSON Schema
JSON Schema validation asserts constraints on the structure of instance data. ... possible instance values of the correct type that will fail validation.¶....
Read more >JSON Schema validation fails or hangs against large ... - GitHub
When i try to validate json object against large JSON Schema, it fails or rather keep on processing for unlimited time.
Read more >Validate Complex JSON Schema With References in Postman
With this jsonSchema tool, I can turn my data into a JSON Schema. It's naive to think that this is all I need...
Read more >JSON validation - IBM
A validation error occurs when the JSON document does not conform to the rules that are defined in the JSON schema. The JSON...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you explain the use-case further? Are you using Apicurio SerDes with JSON Schema validation enabled in a Kafka application? How are you validating the message/data using the schema registered in registry?
Closing as it was confirmed in https://github.com/Apicurio/apicurio-registry/pull/2854 that the fix is working as expected.