Add Mealie V3 ingredient fields#664
Conversation
|
Hi, this will be a nice addition as Mealie has started adding a lot more detail on the recipe which could be useful for LLM use within Home Assistant. |
|
Thanks! I just added the Food model, there is no documentation on it so I did it based on the returned data by the API. For the tests, how are the fixtures generated? Should I adapt them by hand, or can we regenerate them to match the V3 version? |
|
You can manually update the recipe.json file, probably best to add some new ones at the end, we'd want to at least test the complex optional fields being there or not. To regenerate the snapshot use |
|
Just a couple of aliases to snake case missing, you'll need to regen your snapshot as well |
Proposed Changes
I am running Mealie version 3.9.2, and this seems to return more ingredient data when requesting a recipe than currently parsed in the models. When I request a recipe using
GET /api/recipes/<recipe_id>every element under ingredients looks like this:This actually means that we now can obtain the list of needed ingredients, instead of only having some references. This PR adds these new fields into the ingredients model.