Skip to content

Commit

Permalink
Create beersSchema.json
Browse files Browse the repository at this point in the history
Signed-off-by: Linards <33150232+HolimaX@users.noreply.github.com>
  • Loading branch information
HolimaX authored Sep 15, 2024
1 parent d46c790 commit 0c1dfac
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions src/beersSchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"tagline": { "type": "string" },
"first_brewed": { "type": "string" },
"description": { "type": "string" },
"image_url": { "type": "string", "format": "uri" },
"abv": { "type": "number" },
"ibu": { "type": "integer" },
"target_fg": { "type": "integer" },
"target_og": { "type": "integer" },
"ebc": { "type": "integer" },
"srm": { "type": "integer" },
"ph": { "type": "number" },
"attenuation_level": { "type": "number" },
"volume": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
},
"boil_volume": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
},
"method": {
"type": "object",
"properties": {
"mash_temp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"temp": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
},
"duration": { "type": "integer" }
},
"required": ["temp", "duration"]
}
},
"fermentation": {
"type": "object",
"properties": {
"temp": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
}
},
"required": ["temp"]
},
"twist": { "type": ["string", "null"] }
},
"required": ["mash_temp", "fermentation"]
},
"ingredients": {
"type": "object",
"properties": {
"malt": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"amount": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
}
},
"required": ["name", "amount"]
}
},
"hops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"amount": {
"type": "object",
"properties": {
"value": { "type": "number" },
"unit": { "type": "string" }
},
"required": ["value", "unit"]
},
"add": { "type": "string" },
"attribute": { "type": "string" }
},
"required": ["name", "amount", "add", "attribute"]
}
},
"yeast": { "type": "string" }
},
"required": ["malt", "hops", "yeast"]
},
"food_pairing": {
"type": "array",
"items": { "type": "string" }
},
"brewers_tips": { "type": "string" },
"contributed_by": { "type": "string" }
},
"required": [
"id", "name", "tagline", "first_brewed", "description", "image_url", "abv", "ibu", "target_fg", "target_og", "ebc", "srm", "ph", "attenuation_level", "volume", "boil_volume", "method", "ingredients", "food_pairing", "brewers_tips", "contributed_by"
]
}

0 comments on commit 0c1dfac

Please sign in to comment.