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

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

Closed
9 tasks
dontcallmedom-bot opened this issue Aug 30, 2024 · 2 comments · Fixed by w3c/strudy#788
Assignees

Comments

@dontcallmedom-bot
Copy link

dontcallmedom-bot commented Aug 30, 2024

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):

  • The value "conditionalGet" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "signalAllAcceptedCredentials" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "hybridTransport" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "passkeyPlatformAuthenticator" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "conditionalCreate" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "userVerifyingPlatformAuthenticator" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "relatedOrigins" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "signalUnknownCredential" of the enum ClientCapability does not match the expected conventions (lower case, hyphen separated words)
  • The value "signalCurrentUserDetails" of the enum ClientCapability does not match the expected 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
Copy link
Member

emlun commented Aug 30, 2024

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 MasterKale self-assigned this Sep 11, 2024
@MasterKale
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants