{ "definitions": { "currencyEnum": { "title": "Currency", "type": "string", "enum": [ "currency_enum_list" ] }, "sub_categoryEnum": { "title": "Sub-Category", "type": "string", "enum": [ "equip_sub_category_enum_list" ] } }, "properties": { "Item": { "type": "array", "minItems": 1, "title": "Items", "items": { "type": "object", "required": [ "sub_category", "item", "qty", "currency_type", "currency", "unit_price" ], "properties": { "sub_category": { "$ref": "#/definitions/sub_categoryEnum", "title": "Sub-Category" }, "item": { "type": "string", "title": "Item" }, "qty": { "type": "number", "title": "Qty" }, "currency_type": { "type": "string", "title": "Currency Type", "enum": [ "Crypto", "Fiat" ] }, "unit_price": { "type": "string", "title": "Unit Price", "pattern": "^(\\d{1,3}(,?\\d{3})*)(\\.\\d\\d)?$", "validationErrorMessage": "Must have no commas orcommas every 3 places, period for separator, 0 or 2 numbers after separator" } }, "dependencies": { "currency_type": { "oneOf": [{ "properties": { "currency_type": { "enum": [ "Crypto" ] }, "currency": { "title": "Crypto Currencies", "type": "string", "enum": [ "ETH", "DAI", "SNT" ] } }, "required": [ "currency" ] }, { "properties": { "currency_type": { "enum": [ "Fiat" ] }, "currency": { "$ref": "#/definitions/currencyEnum", "title": "Fiat Currency" } } } ] } } } } } }