Skip to content

Commit dab3704

Browse files
committed
GetWorkspaces
1 parent fe48812 commit dab3704

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

coderd/apidocs/docs.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const docTemplate = `{
2929
"get": {
3030
"security": [
3131
{
32-
"APIKey": []
32+
"CoderSessionToken": []
3333
}
3434
],
3535
"produces": [
@@ -427,6 +427,13 @@ const docTemplate = `{
427427
}
428428
}
429429
}
430+
},
431+
"securityDefinitions": {
432+
"CoderSessionToken": {
433+
"type": "apiKey",
434+
"name": "Coder-Session-Token",
435+
"in": "header"
436+
}
430437
}
431438
}`
432439

coderd/apidocs/swagger.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"get": {
2222
"security": [
2323
{
24-
"APIKey": []
24+
"CoderSessionToken": []
2525
}
2626
],
2727
"produces": [
@@ -419,5 +419,12 @@
419419
}
420420
}
421421
}
422+
},
423+
"securityDefinitions": {
424+
"CoderSessionToken": {
425+
"type": "apiKey",
426+
"name": "Coder-Session-Token",
427+
"in": "header"
428+
}
422429
}
423430
}

coderd/coderd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ type Options struct {
124124
// @license.url https://github.com/coder/coder/blob/main/LICENSE
125125

126126
// @BasePath /api/v2
127+
128+
// @securitydefinitions.apiKey CoderSessionToken
129+
// @in header
130+
// @name Coder-Session-Token
127131
// New constructs a Coder API handler.
128132
func New(options *Options) *API {
129133
if options == nil {

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var (
4545

4646
// @Summary Get workspace metadata.
4747
// @ID get-workspace
48-
// @Security APIKey
48+
// @Security CoderSessionToken
4949
// @Produce json
5050
// @Tags Workspaces
5151
// @Param id path string true "Workspace ID"

0 commit comments

Comments
 (0)