Hi there:
We are trying to use the json body to match the given schema. But it failed when it handle the nested Json array. Does it possible to handle the case? Thanks a lot
The Json body:
{ "id": "0001", "batters": { "batter": [ { "id": "1001", "type": "Regular" }, { "id": "1002", "type": "Chocolate"} ] } }
The json schema:
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "id": { "type": "string" }, "batters": { "type": "object", "properties": { "batter": { "type": "array", "items": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "type" ] } ] } }, "required": [ "batter" ] } }, "required": [ "id", "batters" ] }
Hi there: We are trying to use the json body to match the given schema. But it failed when it handle the nested Json array. Does it possible to handle the case? Thanks a lot The Json body:
{ "id": "0001", "batters": { "batter": [ { "id": "1001", "type": "Regular" }, { "id": "1002", "type": "Chocolate"} ] } }
The json schema:{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "id": { "type": "string" }, "batters": { "type": "object", "properties": { "batter": { "type": "array", "items": [ { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } }, "required": [ "id", "type" ] } ] } }, "required": [ "batter" ] } }, "required": [ "id", "batters" ] }