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

Inconsistent capitalisation of classes in URLs #75

Open
paulmillar opened this issue Dec 6, 2024 · 2 comments
Open

Inconsistent capitalisation of classes in URLs #75

paulmillar opened this issue Dec 6, 2024 · 2 comments

Comments

@paulmillar
Copy link

According to W3's "HTML and URLs" URLs should be case sensitive:

There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive

However, the API documentation is inconsistent in how the classes are represented within URLs.

For example, on the api-calls page, the Get dataset call is documented as:

GET /datasets/{pid}

However, the example curl invocation (immediately below) is

curl -X GET --header 'Accept: application/json' 'http://localhost:3000/api/Datasets/{pid}?filter={filter}'

Note the difference between datasets and Datasets.

This problem seems to be systemic, with all documentation mixing capitalised- and lower-case versions of the class name.

If Datasets and datasets are meant to be synonyms for the same resource (i.e., the word is case insensitive) then this must be clearly documented, as this would go against the common semantics of URLs.

The API documents appear to have no statement on case sensitivity, so one would assume the URLs are case-sensitive (per W3's document).

Therefore the API document is inconsistent.

@paulmillar
Copy link
Author

paulmillar commented Jan 14, 2025

Oscar Matilla (CELLS/ALBA) reported to me that he was informed by Toni Fernandez (also CELLS/ALBA) that the correct capitalisation is Datasets.

@paulmillar
Copy link
Author

To add further confusion: D3.1 "API Definition (common search API)", when defining the API, uses the lower-case classes: datasets, documents, ...

In D3.1, the capitalised classes (e.g, "Datasets") appear only in English prose, never in the technical documentation (API calls, etc).

Therefore, when reading only from D3.1, I would take datasets to be the correct term in a URL; e.g., https://example.org/search/datasets/count is correct.

The use of Datasets in the URL is wrong; e.g., https://example.org/search/Datasets/count is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant