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

naming-conventions.md - de-preference case #51

Merged
merged 4 commits into from
Mar 19, 2021
Merged

naming-conventions.md - de-preference case #51

merged 4 commits into from
Mar 19, 2021

Conversation

TimGoodwill
Copy link

@TimGoodwill TimGoodwill commented Sep 16, 2020

Update to naming-conventions.md to de-preference case, issues #23, #34, #40

Preferencing snake_case over camelCase is an odd choice, and unnecessary. Preference will largely come down to the technology stack – CamelCase for Java/JavaScript and snake_case for Python/Ruby.

In terms of common usage, the weight is with camelCase at this point in time. Several federal departments/agencies currently mandate the use of camelCase for member/field names, and camelCase has been the preference in the previous DTA API guidance, as well as current UK, WhiteHouse (US) and New Zealand API guidance. Canada specifies either camel or 'underscore' case but does not preference. CamelCase is the standard case used in JSON-API, restfulapi.net, google and Microsoft guidance and JavaScript standard convention (https://www.w3schools.com/js/js_conventions.asp).

In this edit, references to case have been reworded to remove any explicit preference of one convention over the other.
Additionally, the text has been reworded to refer to "case" explicitly, rather than 'message format', and to stress consistency.

Update to naming-conventions.md to de-preference case,  issues #23, #34, #40
@TimGoodwill TimGoodwill changed the title Naming Conventions - De-Preference Case naming-conventions.md - de-preference case Sep 24, 2020
Update to provide OData filter syntax example
Copy link

@jordanwalsh23 jordanwalsh23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the Victorian perspective I'm ok to proceed on this basis to de-preference the case. Whilst I do like the idea of being prescriptive, it's quite difficult to expect that all consumers will be able to adhere.

@ghost
Copy link

ghost commented Nov 23, 2020

Agree with the update wording.

Within an API it should be consistent.

BUT to make intro easier, we need to standardise on one as the preference. Our preference is camelCase.

For QLD, with the API Graph we have consistency within the Graph using camelCase, and the more API’s to be integrated which use camelCase the less transformation that is required.

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

Successfully merging this pull request may close these issues.

3 participants