microsoft / api-guidelines

Microsoft REST API Guidelines
Other
22.69k stars 2.71k forks source link

Two letter acronym guidance #404

Open corranrogue9 opened 1 year ago

corranrogue9 commented 1 year ago

In our naming guidelines, we say this about two-letter acronyms:

☑️ SHOULD case two-letter acronyms with the same case.

We also don't say anything specific about two-letter abbreviations. I think for ID (which is arguable if it's an acronym or an abbreviation, but I don't think it matters here) we have the general pattern of something like myId rather than myID. I also think that we do the same for other two-letter tokens. I suggest that we either remove this naming convention, or we specifically call out that ID should not follow this pattern.

corranrogue9 commented 1 year ago

@OlgaPodo Continuing this discussion from the PR, I think that the guidance should ultimately say (ignoring whatever it currently says) that abbreviations should be avoided, and that acronyms (no matter the length) are to be camel-cased just like anything else. I'm using my above example of "ID" as the biggest motivator for my suggestion. I don't really think that we would be changing the guidance, I think that we would be aligning the guidance docs with what we actually suggest.