Skip to content

Commit 93279df

Browse files
authored
chore: change format of key from uuid to string to fix swagger issue (#19380)
ref: https://codercom.slack.com/archives/C014JH42DBJ/p1755192759211289 this change allows api keys to be deleted via swagger
1 parent 4da0cfb commit 93279df

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apikey.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (api *API) postAPIKey(rw http.ResponseWriter, r *http.Request) {
151151
// @Produce json
152152
// @Tags Users
153153
// @Param user path string true "User ID, name, or me"
154-
// @Param keyid path string true "Key ID" format(uuid)
154+
// @Param keyid path string true "Key ID" format(string)
155155
// @Success 200 {object} codersdk.APIKey
156156
// @Router /users/{user}/keys/{keyid} [get]
157157
func (api *API) apiKeyByID(rw http.ResponseWriter, r *http.Request) {
@@ -292,7 +292,7 @@ func (api *API) tokens(rw http.ResponseWriter, r *http.Request) {
292292
// @Security CoderSessionToken
293293
// @Tags Users
294294
// @Param user path string true "User ID, name, or me"
295-
// @Param keyid path string true "Key ID" format(uuid)
295+
// @Param keyid path string true "Key ID" format(string)
296296
// @Success 204
297297
// @Router /users/{user}/keys/{keyid} [delete]
298298
func (api *API) deleteAPIKey(rw http.ResponseWriter, r *http.Request) {

docs/reference/api/users.md

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy