diff --git a/schema/item.json b/schema/item.json index 9f27fc2..3ce9805 100644 --- a/schema/item.json +++ b/schema/item.json @@ -15,27 +15,33 @@ "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": "object", + "minProperties": 1, + "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." + }, + "barcodes": { + "type": "array", + "title": "Associated Barcodes", + "description": "Associated Barcodes", + "items": { "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." + "title": "Barcode" } } }