Repository navigation
Add create_recipe, update_recipe and delete_recipe endpoints - #735
Merged
Merged
Conversation
Adds MutateRecipe model for typed update payloads. The create endpoint only requires a name; additional fields can be set via update_recipe.
joostlek
reviewed
Jun 4, 2026
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}) |
Owner
There was a problem hiding this comment.
Maybe you've answered this in the other PR, but can't this take more arguments?
Contributor
Author
There was a problem hiding this comment.
It's true that it's just a recipe creation with its name. And we populate it with update_recipe(slug, recipe_data).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Add CRUD write endpoints for recipes.
create_recipe(name)—POST /api/recipesupdate_recipe(slug, MutateRecipe)—PUT /api/recipes/{slug}delete_recipe(slug)—DELETE /api/recipes/{slug}The Mealie API only requires
nameat creation time; all other fields can be set afterwards viaupdate_recipe.MutateRecipeis a typed dataclass covering the full set of writable recipe fields (name, description, categories, tags, times, ingredients, instructions, etc.).New model:
MutateRecipeTests and Syrupy snapshots included for all new endpoints.
Related Issues
Splits out the recipe CRUD part of #730.