Skip to content

Consistent naming conventions for plural collection objects #176

Description

@ktaletsk

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:

Collection type API endpoint Collection element endpoint JSON key containing elements of collection
Image Collections /api/imagesCollections /api/imagesCollections/{imagesCollectionId}/images _embedded -> images
CSV Collections /api/csvCollections /api/csvCollections/{csvCollectionId}/csv _embedded -> csvs
Generic Data Collections /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 and csvs, genericFile and genericFiles) 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:

Collection type API endpoint Collection element endpoint JSON key containing elements of collection
Image Collections /api/imagesCollections /api/imagesCollections/{imagesCollectionId}/images _embedded -> images
CSV Collections /api/csvCollections /api/csvCollections/{csvCollectionId}/csvs _embedded -> csvs
Generic Data Collections /api/genericDataCollections /api/genericDatas/{genericDataId}/genericFiles _embedded -> genericFiles

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement of existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions