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

API: Inconsistent use of camel and snake case in request body #2551

Open
marhei opened this issue May 8, 2024 · 3 comments
Open

API: Inconsistent use of camel and snake case in request body #2551

marhei opened this issue May 8, 2024 · 3 comments
Labels
APIv1 bug Something isn't working

Comments

@marhei
Copy link
Contributor

marhei commented May 8, 2024

To simplify the use of automatic key encoding strategies, a standardised use of either camel or snake case for keys in the request body would make sense. Currently, for example, camel case is used in the /trains/checkin endpoint, but snake case is used in the new /report endpoint.

@marhei marhei added the bug Something isn't working label May 8, 2024
@MrKrisKrisu
Copy link
Member

In long term I would have a look at the API Guidelines from Zalando which recommend kebab-case. (idea from @HerrLevin)

https://opensource.zalando.com/restful-api-guidelines/

@MrKrisKrisu
Copy link
Member

Oh, sorry. You mean the keys. I don't know if there is a recommendation, but I personally prefer camelCase here. We can discuss that here.

@marhei
Copy link
Contributor Author

marhei commented May 8, 2024

As all other endpoints use keys in camel case and the report endpoint is not yet widely used, I would recommend changing the key from this endpoint to camel case as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIv1 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants