cdb/schema/item.json
2024-08-30 14:13:56 +02:00

48 lines
No EOL
1.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Item",
"description": "Item Metadata",
"properties": {
"name": {
"type": "string",
"title": "Item Name",
"description": "The name of the Item"
},
"category": {
"title": "Category",
"description": "The category of the item",
"type": "string"
},
"variants": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"title": "Item Variant",
"description": "A Variant of an Item",
"properties": {
"name": {
"type": "string",
"title": "Variant Name",
"description": "The name of the Variant"
},
"min": {
"type": "number",
"title": "Minimum inventory",
"description": "The minimum amount of inventory for an Item. Thre actual inventory amount should always be higher than that."
},
"expiry": {
"type": "number",
"title": "Expiry days",
"description": "Number of days until this item variant is considered expired."
}
}
}
}
},
"required": [
"name",
"variants"
]
}