I am new to this json schema , i am able to write json schema if it has only one data set like below
{
"employees": [
{
"id": 1,
"name": "aaa"
}
}
example json-schema for this is
{
"type" : "object",
"required" : ["employees"],
"properties" : {
"employees" : { "type" : "Array",
"items" : [
"properties" : {
"id" : {"type" : "integer"},
"name" : {"type" : "string"},
},
"required" : ["id","name"]
]
}
}
}
but i got stuck to write json schema in ruby if we have multiple data sets
{
"employees": [
{
"id": 1,
"name": "aaa"
},
{
"id": 2,
"name": "bbb"
},
{
"id": 3,
"name": "cccc"
},
{
"id": 4,
"name": "ddd"
},
{
"id": 5,
"name": "eeee"
}
]
}
can anyone please help me to write json schema if it has multiple data sets for same schema to validate the response body