-
Notifications
You must be signed in to change notification settings - Fork 10
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
Consistent naming conventions for plural collection objects #176
Comments
That's a good point, it seems that it happening for the most recent additions to the API, I will fix the endpoints. |
I'll probably look through the most of the API endpoints in the near future as I'm working on the Python client for the API (here: PolusAI/data-tools#1). I will report any findings of the inconsistent names in this thread |
In this case, I should rename GenericData in my PR #184. Should we go for |
I am good with |
If anyone has an idea for a better name though, now is a good time to voice it :) |
I think at some point someone floated the idea of introducing the word |
Following the comment about using plurals, the names should be XXXCollections. I would vote for RawDataCollections (GenericDataCollections would be fine too) since UnstructuredDataCollections is used by text mining researchers for unstructured text. |
@MyleneSimon Yeah I will make sure that Swagger annotations are updated. |
I think @NHotaling was the one who suggested I have already renamed |
Description
Currently, naming conventions endpoints and JSON keys for different collection types are slightly inconsistent when it comes to plural of the collection object (images, csvs, datas). To demonstrate the issue, take a look at the table below:
/api/imagesCollections
/api/imagesCollections/{imagesCollectionId}/images
_embedded
->images
/api/csvCollections
/api/csvCollections/{csvCollectionId}/csv
_embedded
->csvs
/api/genericDatas
/api/genericDatas/{genericDataId}/genericFile
_embedded
->genericFiles
So, you can see that the same word
images
is used in both the endpoint and JSON key in this case, but different words (csv
andcsvs
,genericFile
andgenericFiles
) are used in other cases.Proposal
Use the plural form for objects; use the same form in all places in the API. The following naming scheme would be more consistent:
/api/imagesCollections
/api/imagesCollections/{imagesCollectionId}/images
_embedded
->images
/api/csvCollections
/api/csvCollections/{csvCollectionId}/csvs
_embedded
->csvs
/api/genericDataCollections
/api/genericDatas/{genericDataId}/genericFiles
_embedded
->genericFiles
The text was updated successfully, but these errors were encountered: