Repository navigation
Add get_categories, get_tags, get_tools, get_foods and get_units endpoints - #734
Conversation
…oints Also fix Instruction.title field ordering (move optional field after required fields) and rename async version property to get_version() method.
ddefe5d to
7a586fd
Compare
5d86861 to
1f46e38
Compare
Resolve conflicts in models.py and tests by keeping both the organizers models/tests (categories, tags, tools, foods, units) and the favorites/ratings additions from main (joostlek#738).
Resolve conflicts in tests by keeping both the organizers tests (categories, tags, tools, foods, units) and the shopping-list/favorites tests now present in main (joostlek#737, joostlek#738).
Resolve conflicts in tests by keeping both the organizers tests and the mealplan tests now merged into main (joostlek#736), alongside the shopping-list and favorites tests (joostlek#737, joostlek#738).
|
Rebased onto the latest main to resolve the merge conflicts. The conflicts in tests/test_mealie.py and tests/snapshots/test_mealie.ambr were purely additive: this branch and the recently merged PRs (#736, #737, #738) all append tests/snapshots to the All tests pass locally (uv run pytest) and the branch is mergeable again. |
Out of scope for this PR; can be revisited separately.
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
andrew-codechimp
left a comment
There was a problem hiding this comment.
Looks good to me, any reason not to merge?
I have a new FR that has a dependency on the tool model
Proposed Changes
Add read-only list endpoints for recipe organizers, foods and units.
Organizers
get_categories(per_page=-1)—GET /api/organizers/categoriesget_tags(per_page=-1)—GET /api/organizers/tagsget_tools(per_page=-1)—GET /api/organizers/toolsFoods & Units
get_foods(per_page=-1)—GET /api/foodsget_units(per_page=-1)—GET /api/unitsper_page=-1is Mealie's convention for "return all results in a single page".New models:
Tool,CategoriesResponse,TagsResponse,ToolsResponse,FoodsResponse,UnitsResponseBug fixes included:
Instruction.titlefield ordering — optional field moved after required fieldsasync versionproperty toget_version()method (a property cannot be awaited)Tests and Syrupy snapshots included for all new endpoints.
Related Issues
Splits out the organizers + foods/units part of #730.