2019-06-17 20:21:45 +10:00
|
|
|
{
|
2019-11-16 09:01:57 +10:00
|
|
|
"$id": "newProduct",
|
2019-06-17 20:21:45 +10:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"productPermalink": {
|
2020-03-17 18:38:46 +10:00
|
|
|
"type": "string",
|
|
|
|
"isNotEmpty": true,
|
|
|
|
"minLength": 2
|
2019-06-17 20:21:45 +10:00
|
|
|
},
|
|
|
|
"productTitle": {
|
2020-03-17 18:38:46 +10:00
|
|
|
"type": "string",
|
|
|
|
"isNotEmpty": true,
|
|
|
|
"minLength": 5
|
2019-06-17 20:21:45 +10:00
|
|
|
},
|
|
|
|
"productPrice": {
|
2020-01-08 18:28:29 +10:00
|
|
|
"type": "string",
|
2019-11-16 12:22:54 +10:00
|
|
|
"format": "amount"
|
2019-06-17 20:21:45 +10:00
|
|
|
},
|
|
|
|
"productDescription": {
|
2020-03-17 18:38:46 +10:00
|
|
|
"type": "string",
|
|
|
|
"isNotEmpty": true,
|
|
|
|
"minLength": 25
|
2019-06-17 20:21:45 +10:00
|
|
|
},
|
|
|
|
"productPublished": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"productTags": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"productOptions": {
|
|
|
|
"type": ["object", "string", "null"]
|
|
|
|
},
|
|
|
|
"productComment": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"productStock": {
|
|
|
|
"type": ["number", "null"]
|
2020-03-22 19:23:47 +10:00
|
|
|
},
|
|
|
|
"productStockDisable": {
|
|
|
|
"type": "boolean"
|
2019-06-17 20:21:45 +10:00
|
|
|
}
|
|
|
|
},
|
2020-03-17 18:38:46 +10:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
},
|
2019-06-17 20:21:45 +10:00
|
|
|
"required": [
|
|
|
|
"productPermalink",
|
|
|
|
"productTitle",
|
|
|
|
"productPrice",
|
|
|
|
"productDescription",
|
|
|
|
"productPublished"
|
|
|
|
]
|
|
|
|
}
|