If Type Array is empty then it is failing.
Opened this issue · 2 comments
rahulkamuni commented
For Example if my input JSON is below :
{
"metadata": {
"properties": []
}
}
Then schema is not generating properly . we are getting below exception
"main" java.lang.NullPointerException.
Because in code we have taken directly
node = jsonNode.get(key).get(0);
Do you have any solution for this ?
simplymequeeny commented
hi please try adding value to 'properties' field. let me know if it is failing thanks
rahulkamuni commented
Thanks for your reply. For non-Empty array it is running properly . But We have huge JSON with lot of empty arrays. We are planning generated schema for empty arrays also.