{"openapi":"3.1.0","info":{"title":"Blue Plate Chef Recipe API","version":"1.0.0","description":"Query recipes from Blue Plate Chef. List, search, retrieve full details, and get scaled ingredient quantities."},"servers":[{"url":"https://willsdevtools.co.uk"}],"paths":{"/api/recipes":{"get":{"operationId":"listRecipes","summary":"List or search recipes","parameters":[{"name":"q","in":"query","description":"Search term — matches title, tags, intro, and ingredients","schema":{"type":"string"}},{"name":"kind","in":"query","description":"Filter by recipe kind","schema":{"type":"string","enum":["food","cocktail"]}},{"name":"tag","in":"query","description":"Filter by a single tag (exact match, case-insensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"List of recipe summaries","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"recipes":{"type":"array","items":{"$ref":"#/components/schemas/RecipeSummary"}}}}}}}}}},"/api/recipes/{slug}":{"get":{"operationId":"getRecipe","summary":"Get full recipe details including ingredients and steps","parameters":[{"name":"slug","in":"path","required":true,"description":"Recipe slug (e.g. lemon-drizzle-cake)","schema":{"type":"string"}}],"responses":{"200":{"description":"Full recipe object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeFull"}}}},"404":{"description":"Recipe not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/recipes/{slug}/scaled":{"get":{"operationId":"getScaledRecipe","summary":"Get ingredient quantities scaled to a target number of servings","parameters":[{"name":"slug","in":"path","required":true,"description":"Recipe slug","schema":{"type":"string"}},{"name":"servings","in":"query","required":true,"description":"Target number of servings","schema":{"type":"number","minimum":0.5}}],"responses":{"200":{"description":"Scaled ingredient list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScaledRecipe"}}}},"400":{"description":"Invalid servings value"},"404":{"description":"Recipe not found"}}}}},"components":{"schemas":{"RecipeSummary":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string","nullable":true},"kind":{"type":"string","enum":["food","cocktail"]},"tags":{"type":"array","items":{"type":"string"}},"prepTime":{"type":"integer","description":"Minutes"},"cookTime":{"type":"integer","description":"Minutes"},"totalTime":{"type":"integer","description":"Minutes"},"baseServings":{"type":"integer"}}},"RecipeFull":{"allOf":[{"$ref":"#/components/schemas/RecipeSummary"},{"type":"object","properties":{"intro":{"type":"string","nullable":true},"kicker":{"type":"string","nullable":true},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/Ingredient"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"}}}}]},"Ingredient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"aisle":{"type":"string"},"notes":{"type":"string","nullable":true}}},"Step":{"type":"object","properties":{"number":{"type":"integer"},"title":{"type":"string","nullable":true},"body":{"type":"string"},"timer":{"type":"integer","nullable":true,"description":"Seconds"}}},"ScaledRecipe":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"baseServings":{"type":"integer"},"targetServings":{"type":"number"},"multiplier":{"type":"number"},"scaledIngredients":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"string","description":"Human-readable scaled amount"},"unit":{"type":"string"},"aisle":{"type":"string"},"notes":{"type":"string","nullable":true}}}}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}}}