What naming conventions should the services follow when communicating?

Acronym
naming-conventions-communication
Belongs to
SIG
Responsible
TimP
History
(v1)   2021-11-06 - created initially

Why is there need for such a decision?

It has already been decided that the API routes use kebab case. In order to further standardize the communication between the services, it is also necessary to specify in which style the variables within the objects used for communication are named.

Additional sources for better understanding the background

ECMA-404

Google JSONC Styleguide

Facebook JavaScript API

Amazon Web Services

Viable Options

- snake_case
- camelCase
- kebab-case
- YELLING_SNAKE-KEBAB_CASE

Alternatives not seriously considered

Kebab-Case

The main reason to use kebab case is that it improves readability for SEO relevant systems. Also, it is a widely used standard, especially at the end of the URL (Designing Web APIs by Brenda Jin, Saurabh Sahni, Amir Shevat)[https://www.oreilly.com/library/view/designing-web-apis/9781492026914/]. However, it is not considered for the names of keys within an object in this system. This decision is based on the fact that none of the used development languages use this style for naming variables. It has already been decided that the API routes use kebap case. In order to further standardize the communication between the services, it is also necessary to specify in which style the variables within the objects used for communication are named.

Underlying assumptions

It has not yet been determined how the services communicate with each other. A standard such as (cloudevents)[https://github.com/cloudevents/spec] has already been proposed for the events. The responses and requests via the REST interfaces have so far been formulated by all teams in a JSON-like format. Therefore, this decision is based on the assumption that communication will be done using JSON.

How is this decision evaluated?

By researching online for known standards and looking at large established projects.

Resolution Details

camelCase

Reasons for the resolution

Finding the right naming style depends heavily on the technology stack used. Since the technologies used in this project mainly use the camelCase internally, this was also chosen as the standard.

Language Convention Reference
Java camelCase https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
Kotlin camelCase https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/json.md
Ruby camelCase or snake_case https://github.com/rubocop/ruby-style-guide