Closed lvimalchandran closed 6 years ago
@lvimalchandran I think your data file is not valid according to your schema.
There are two PartyContainer
$.CompositeLoanContainer.PartyContainer
: This is an array type. But in your schema file, it's at the root level. $.PartyContainer
: This is the object type. But in your schema file, it's an array.I think you can correct the things, then your file can be validated against your schema.
Just a tip: Whenever you're adding code to Github, add triple backticks (```) before and after the code. This makes it easily readable for other people.
Thanks @ghsatpute. yes you are right. I corrected my schema file by adding 's' to the PartyContainer at the root level. and then generated pojo and json data file. Now the validation looks good against the schema.
yes sure here after I will post code with (```).
Below are the Json schema and its data file. but when I validated against each other, it throws schema validation error.
Error Message: instance type (array) does not match any allowed primitive type (allowed: ["object"])
Schema: