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

Plural vs Singular entity names in REST URIs #5

Closed
neilstevens2005 opened this issue Oct 9, 2015 · 3 comments
Closed

Plural vs Singular entity names in REST URIs #5

neilstevens2005 opened this issue Oct 9, 2015 · 3 comments
Labels
Milestone

Comments

@neilstevens2005
Copy link

When retrieving an entity the "Format for URI" section specifies that the "key-entity-type" should be set to the alpha code value from the code list ENT. Therefore if following this exactly to create a URI to retrieve a manifest I would create:

/lcf/1.0/manifestation/{manifest-id}

This contains "manifestation" (singular)

There is then an example URI in the standard which is:

GET http://192.168.0.99:80/lcf/1.0/manifestations/1234567890

This contains "manifestations" (plural)

The examples in the standard do not have consistent use of plural or singular

Retrieve: GET http://192.168.0.99:80/lcf/1.0/manifestations/1234567890 (plural)
Retrieve list: http://192.168.0.99:80/lcf/1.0/manifestations (plural)
Create: POST http://192.168.0.99:80/lcf/1.0/manifestation (singular)
Modify: PUT http://192.168.0.99:80/lcf/1.0/manifestation/1234567890 (singular)
Delete: DELETE http://192.168.0.99:80/lcf/1.0/manifestation/1234567890 (singular)

I think it would make more sense to always use plural and make it clear that the plural should always be used. This is because a RESTful URIs should be structured so each part is an element of the previous part.

In the retrieve, modify and delete URI examples the manifestation "1234567890" is an element of the "manifestations" collection.
In the retrieve list URI, the collection of "manifestations" is being retrieved
In the create URI a new manifest is being added to the "manifestations" collection

@franciscave
Copy link
Collaborator

The inconsistency was deliberate, but I do agree in retrospect that it is probably a mistake. We should discuss, but my hunch is that this should be consistently plural throughout.

@franciscave
Copy link
Collaborator

I will edit the code list ENT to make all alpha values plural, and will adjust examples so that they are always plural.

@franciscave
Copy link
Collaborator

Please check that all occurrences of entity types in the documentation for code list ENT and in the examples in the web service implementation documentation are now in the plural form.

@mdovey mdovey added this to the 1.0.1 milestone Feb 2, 2018
@mdovey mdovey added the Erratum label Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants