Task: move legacy routes to GET reads and shallow nesting #23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two new conventions from spec 001 (
docs/adr/2026-09-30-get-reads-and-shallow-nesting.md,docs/api-conventions.md) are not yet followed by older routes:Reads without a request body must use GET. These are POST without a body:
POST /meal-plan/listapi-contract/src/meal-plans.tsPOST /passkey/listapi-contract/src/passkeys.tsAt most one id per path (shallow nesting). These carry two ids, or identify a child by an id in the body under the parent's path:
DELETE /recipe/:id/images/:imageIdapi-contract/src/recipes.tsDELETE /meal-plan/:id/day/:dayIdapi-contract/src/meal-plans.tsDELETE /meal-plan/:id/share/:shareIdapi-contract/src/meal-plans.tsPOST /meal-plan/:id/day/save-or-update(update case: day id in body)api-contract/src/meal-plans.tsPOST /meal-plan/:id/share/save-or-update(update case: share id in body)api-contract/src/meal-plans.tsFix
Move each route to the new form when its domain is next touched, e.g.
GET /meal-plan/all,DELETE /meal-plan-day/:dayId,POST /meal-plan/:id/add-dayplusPOST /meal-plan-day/:dayId/<verb>. Contract change affecting recipe-backend and recipe-app; the meal plan share routes can go together with recipe-app#46.Found during the cross-cutting architecture review of spec 001 (PR #20).
Contract: move legacy routes to GET reads and shallow nestingto Task: move legacy routes to GET reads and shallow nesting