54 lines
1.3 KiB
JSON
54 lines
1.3 KiB
JSON
{
|
|
"$id": "newProduct",
|
|
"type": "object",
|
|
"properties": {
|
|
"productPermalink": {
|
|
"type": "string",
|
|
"isNotEmpty": true,
|
|
"minLength": 2
|
|
},
|
|
"productTitle": {
|
|
"type": "string",
|
|
"isNotEmpty": true,
|
|
"minLength": 5
|
|
},
|
|
"productPrice": {
|
|
"type": "string",
|
|
"format": "amount"
|
|
},
|
|
"productDescription": {
|
|
"type": "string",
|
|
"isNotEmpty": true,
|
|
"minLength": 25
|
|
},
|
|
"productPublished": {
|
|
"type": "boolean"
|
|
},
|
|
"productTags": {
|
|
"type": "string"
|
|
},
|
|
"productOptions": {
|
|
"type": ["object", "string", "null"]
|
|
},
|
|
"productComment": {
|
|
"type": "boolean"
|
|
},
|
|
"productStock": {
|
|
"type": ["number", "null"]
|
|
}
|
|
},
|
|
"errorMessage": {
|
|
"properties": {
|
|
"productPrice": "Should be a full 2 decimal value. Eg: 10.99",
|
|
"productPublished": "Should be either true or false",
|
|
"productComment": "Should be either true or false"
|
|
}
|
|
},
|
|
"required": [
|
|
"productPermalink",
|
|
"productTitle",
|
|
"productPrice",
|
|
"productDescription",
|
|
"productPublished"
|
|
]
|
|
} |