allow using a single string as an ingredient instead of a dict
This commit is contained in:
parent
072aa03a53
commit
883f0756f9
5 changed files with 59 additions and 17 deletions
|
@ -13,17 +13,22 @@
|
|||
"ingredients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$id": "https://example.com/ingredient.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [ "name" ],
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"amount": { "type": "number" },
|
||||
"unit": { "type": "string" },
|
||||
"or": { "items": { "$ref": "/ingredient.json" } },
|
||||
"note": { "type": "string" }
|
||||
}
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"$id": "https://example.com/ingredient.json",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [ "name" ],
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"amount": { "type": "number" },
|
||||
"unit": { "type": "string" },
|
||||
"or": { "items": { "$ref": "/ingredient.json" } },
|
||||
"note": { "type": "string" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"steps": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue