Skip to content

Commit 8a0aa36

Browse files
committed
Fix: string uuid
1 parent d8cb335 commit 8a0aa36

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const docTemplate = `{
9898
"parameters": [
9999
{
100100
"type": "string",
101+
"format": "uuid",
101102
"description": "Template ID",
102103
"name": "id",
103104
"in": "path",
@@ -219,6 +220,7 @@ const docTemplate = `{
219220
"parameters": [
220221
{
221222
"type": "string",
223+
"format": "uuid",
222224
"description": "Workspace ID",
223225
"name": "id",
224226
"in": "path",

coderd/apidoc/swagger.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"parameters": [
9191
{
9292
"type": "string",
93+
"format": "uuid",
9394
"description": "Template ID",
9495
"name": "id",
9596
"in": "path",
@@ -211,6 +212,7 @@
211212
"parameters": [
212213
{
213214
"type": "string",
215+
"format": "uuid",
214216
"description": "Workspace ID",
215217
"name": "id",
216218
"in": "path",

coderd/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const (
3939
// @Security CoderSessionToken
4040
// @Produce json
4141
// @Tags Templates
42-
// @Param id path string true "Template ID"
42+
// @Param id path string true "Template ID" format(uuid)
4343
// @Success 200 {object} codersdk.Template
4444
// @Failure 404 {object} codersdk.Response
4545
// @Failure 500 {object} codersdk.Response

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var (
4848
// @Security CoderSessionToken
4949
// @Produce json
5050
// @Tags Workspaces
51-
// @Param id path string true "Workspace ID"
51+
// @Param id path string true "Workspace ID" format(uuid)
5252
// @Param include_deleted query string false "Include deleted"
5353
// @Success 200 {object} codersdk.Workspace
5454
// @Failure 400 {object} codersdk.Response

docs/api/templates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ curl -X GET http://coder-server:8080/api/v2/templates/{id} \
106106

107107
### Parameters
108108

109-
| Name | In | Type | Required | Description |
110-
| ---- | ---- | ------ | -------- | ----------- |
111-
| id | path | string | true | Template ID |
109+
| Name | In | Type | Required | Description |
110+
| ---- | ---- | ------------ | -------- | ----------- |
111+
| id | path | string(uuid) | true | Template ID |
112112

113113
### Example responses
114114

docs/api/workspaces.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id} \
187187

188188
### Parameters
189189

190-
| Name | In | Type | Required | Description |
191-
| --------------- | ----- | ------ | -------- | --------------- |
192-
| id | path | string | true | Workspace ID |
193-
| include_deleted | query | string | false | Include deleted |
190+
| Name | In | Type | Required | Description |
191+
| --------------- | ----- | ------------ | -------- | --------------- |
192+
| id | path | string(uuid) | true | Workspace ID |
193+
| include_deleted | query | string | false | Include deleted |
194194

195195
### Example responses
196196

0 commit comments

Comments
 (0)