fix: allow "me" shortcut in swagger user parameter validation by stirby · Pull Request #24692 · coder/coder · GitHub
Skip to content

fix: allow "me" shortcut in swagger user parameter validation#24692

Open
stirby wants to merge 1 commit intomainfrom
fix/issue-24473
Open

fix: allow "me" shortcut in swagger user parameter validation#24692
stirby wants to merge 1 commit intomainfrom
fix/issue-24473

Conversation

@stirby
Copy link
Copy Markdown
Collaborator

@stirby stirby commented Apr 23, 2026

Closes #24473

The two quiet-hours endpoints in enterprise/coderd/users.go had format(uuid) on their @Param user swagger annotations. Swagger UI validates this client-side, rejecting "me" as not a valid UUID before any request is sent.

All other {user} endpoints use plain string without format(uuid). This removes the format constraint and updates the description to "User ID, name, or me" to match convention.

Changes:

  • enterprise/coderd/users.go: removed format(uuid) from both @Param user annotations
  • coderd/apidoc/docs.go, coderd/apidoc/swagger.json, docs/reference/api/enterprise.md: regenerated via make gen

🤖 Generated by Coder Agents

Review notes
  • These were the only two {user} params with format(uuid) in the codebase
  • 7 other non-user endpoints have similar format(uuid) on name-accepting params (out of scope)
  • Generated files produced by make gen, not hand-edited

@github-actions
Copy link
Copy Markdown

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.

bug: swagger does not accept shorcut "me" as user id

1 participant