Skip to content

Add create_recipe, update_recipe and delete_recipe endpoints - #735

Merged
joostlek merged 1 commit into
joostlek:mainfrom
domodom30:feature/recipe-crud
Jun 4, 2026
Merged

joostlek merged 1 commit into
joostlek:mainfrom
domodom30:feature/recipe-crud

Conversation

@domodom30

Copy link
Copy Markdown
Contributor

Proposed Changes

Add CRUD write endpoints for recipes.

  • create_recipe(name) — POST /api/recipes
  • update_recipe(slug, MutateRecipe) — PUT /api/recipes/{slug}
  • delete_recipe(slug) — DELETE /api/recipes/{slug}

The Mealie API only requires name at creation time; all other fields can be set afterwards via update_recipe. MutateRecipe is a typed dataclass covering the full set of writable recipe fields (name, description, categories, tags, times, ingredients, instructions, etc.).

New model: MutateRecipe

Tests and Syrupy snapshots included for all new endpoints.

Related Issues

Splits out the recipe CRUD part of #730.

Adds MutateRecipe model for typed update payloads. The create endpoint
only requires a name; additional fields can be set via update_recipe.
Comment thread src/aiomealie/mealie.py
Comment on lines +218 to +220
async def create_recipe(self, name: str) -> Recipe:
"""Create a new recipe with the given name."""
response = await self._post("api/recipes", data={"name": name})

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you've answered this in the other PR, but can't this take more arguments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true that it's just a recipe creation with its name. And we populate it with update_recipe(slug, recipe_data).

@joostlek
joostlek merged commit 02845f1 into joostlek:main Jun 4, 2026
12 of 13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants