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

Discussion: Choosing routes for tag related resources #31

Open
NamesJ opened this issue Mar 7, 2021 · 0 comments
Open

Discussion: Choosing routes for tag related resources #31

NamesJ opened this issue Mar 7, 2021 · 0 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@NamesJ
Copy link
Owner

NamesJ commented Mar 7, 2021

Direct routes for tags

/api/tag [DELETE] : delete a tag directly
/api/tag [GET] : get tag info directly
/api/tag [POST] : create a tag directly

Entity-specific paths (i.e. /api/<entity_type>/tag):

/api/offer/tag [DELETE] : remove a tag from an offer
/api/offer/tag [POST] : add a tag to an offer

/api/user/tag [DELETE] : remove a tag from a user
/api/user/tag [POST] : add a tag to a user

Note: I think the above convention for entity specific resources is a good fit as it matches the expectations of the average client (i.e. a normal user). Examples: a user wants to add a tag to their account, or wants to delete a tag from their offer, etc.

Route for searching tags directly:
/api/tag/search [GET]

@NamesJ NamesJ added enhancement New feature or request question Further information is requested labels Mar 7, 2021
@NamesJ NamesJ added this to the Beta milestone Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant