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

Semantic endpoints (singular/plural) #22

Open
smythp opened this issue Mar 22, 2018 · 1 comment
Open

Semantic endpoints (singular/plural) #22

smythp opened this issue Mar 22, 2018 · 1 comment
Labels
1.0 Issues for version 1.0 (current version) enhancement New feature or request

Comments

@smythp
Copy link

smythp commented Mar 22, 2018

According to what I've seen/read, typically the endpoints stay plural, like

baseurl + "/api/subjects/detectivefiction"

In terms of meaning, the category above, subjects, is inclusive of all the subjects. The next delineation, detectivefiction, is the singular.

If the API was like:

baseurl + '/api?subject="detectivefiction"&output=json'

then that makes sense because subject isn't the category above, it's the key to which detectivefiction is the value.

Also it's confusing if "subjects" lists all the subjects and then that's not continued when getting specific subjects.

@JonathanReeve
Copy link
Owner

Sounds good. Then /api/authors/Dickens, Charles would return Dickens novels, and /api/authors/ alone would return a list of all authors. That'd be pretty easy to do.

@JonathanReeve JonathanReeve added enhancement New feature or request 1.0 Issues for version 1.0 (current version) labels Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Issues for version 1.0 (current version) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants