rest-validator
Version:
Validator for json payloads
27 lines (26 loc) • 518 B
JSON
{
"emptyString": "type:string, required:true, allowEmpty:false",
"arrayOfObjects": {
"string": "type:string, min:7",
"arrayOfObjects": {
"number": "type:number, min:3, max:4"
}
},
"mixedArray": [
"type:string",
"type:string",
{
"arrayEmptyObject": "type:object"
}
],
"number": "type:number",
"object": {
"string": "type:string",
"objectLevel2": {
"string": "type:number",
"objectLevel3": {
"string": "type:string"
}
}
}
}