Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support object-based API calls to objain a recipe #1133

Open
christianlupus opened this issue Aug 2, 2022 · 1 comment
Open

Support object-based API calls to objain a recipe #1133

christianlupus opened this issue Aug 2, 2022 · 1 comment
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

Comments

@christianlupus
Copy link
Collaborator

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 multiple Text objects or even HowToSteps. 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 the GET call of /api/recipes/{id}. This can default to a legacy output to be consistent with the current way of formatting things. A new modern (or even v1, object, or similar) will allow switching to the object-based view of the recipes.


Depends on #1110

@christianlupus christianlupus added enhancement New feature or request php Pull requests that update Php code javascript Pull requests that update Javascript code Backend Issue or PR related to the backend code Frontend Issue or PR related to the frontend code API changes involving using the app api labels Aug 2, 2022
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

This PR/issue depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant