Support object-based API calls to objain a recipe #1133
Labels
API
changes involving using the app api
Backend
Issue or PR related to the backend code
dependent
enhancement
New feature or request
Frontend
Issue or PR related to the frontend code
javascript
Pull requests that update Javascript code
php
Pull requests that update Php code
Milestone
Currently, we are transferring most data as strings, arrays, or comma-separated lists of strings when a recipe is to be transferred.
This should be replaced with an object-oriented approach, where text-based transmission is discouraged. So instead of having a
recipeInstructions
array with multiple strings, we should have an array with multipleText
objects or evenHowToSteps
. Similar for all other entries.That will allow extending the Frontend in a separate step to allow for additional per-step images (#47, #324), videos (#206, #315), and other features.
I suggest adding an optional query parameter
view
to theGET
call of/api/recipes/{id}
. This can default to alegacy
output to be consistent with the current way of formatting things. A newmodern
(or evenv1
,object
, or similar) will allow switching to the object-based view of the recipes.Depends on #1110
The text was updated successfully, but these errors were encountered: