w3c / webauthn

Web Authentication: An API for accessing Public Key Credentials
https://w3c.github.io/webauthn/
Other
1.18k stars 171 forks source link

Enum values that ignore naming conventions in Web Authentication: An API for accessing Public Key Credentials - Level 3 #2133

Closed dontcallmedom-bot closed 1 month ago

dontcallmedom-bot commented 2 months ago

While crawling Web Authentication: An API for accessing Public Key Credentials - Level 3, the following enum values were found to ignore naming conventions (lower case, hyphen separated words):

See Use casing rules consistent with existing APIs in Web Platform Design Principles document for guidance.

This issue was detected and reported semi-automatically by Strudy based on data collected in webref.

emlun commented 2 months ago

These enum values use a different naming convention because they are used as keys in the record returned by getClientCapabilities(). These names enable using them as bare identifiers (capabilities.conditionalCreate or { conditionalCreate: true }) instead of having to use index notation (capabilities["conditional-create"]) or quoted keys ({ "conditional-create": true }).

The proposed naming convention was used at earlier points in #1923 but were later changed to improve developer ergonomics.

MasterKale commented 1 month ago

Closing out as we have well-reasoned justification for ignoring kebab-casing in capabilities.