Skip to content

Commit a719007

Browse files
committed
Fix: include_deleted
1 parent 4a52aa8 commit a719007

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const docTemplate = `{
176176
"required": true
177177
},
178178
{
179-
"type": "string",
179+
"type": "boolean",
180180
"description": "Return data instead of HTTP 404 if the workspace is deleted",
181181
"name": "include_deleted",
182182
"in": "query"
@@ -291,7 +291,7 @@ const docTemplate = `{
291291
"required": true
292292
},
293293
{
294-
"type": "string",
294+
"type": "boolean",
295295
"description": "Return data instead of HTTP 404 if the workspace is deleted",
296296
"name": "include_deleted",
297297
"in": "query"

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"required": true
153153
},
154154
{
155-
"type": "string",
155+
"type": "boolean",
156156
"description": "Return data instead of HTTP 404 if the workspace is deleted",
157157
"name": "include_deleted",
158158
"in": "query"
@@ -254,7 +254,7 @@
254254
"required": true
255255
},
256256
{
257-
"type": "string",
257+
"type": "boolean",
258258
"description": "Return data instead of HTTP 404 if the workspace is deleted",
259259
"name": "include_deleted",
260260
"in": "query"

coderd/workspaces.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
// @Produce json
5050
// @Tags Workspaces
5151
// @Param id path string true "Workspace ID" format(uuid)
52-
// @Param include_deleted query string false "Return data instead of HTTP 404 if the workspace is deleted"
52+
// @Param include_deleted query bool false "Return data instead of HTTP 404 if the workspace is deleted"
5353
// @Success 200 {object} codersdk.Workspace
5454
// @Router /workspaces/{id} [get]
5555
func (api *API) workspace(rw http.ResponseWriter, r *http.Request) {
@@ -199,7 +199,7 @@ func (api *API) workspaces(rw http.ResponseWriter, r *http.Request) {
199199
// @Tags Workspaces
200200
// @Param user path string true "Owner username"
201201
// @Param workspacename path string true "Workspace name"
202-
// @Param include_deleted query string false "Return data instead of HTTP 404 if the workspace is deleted"
202+
// @Param include_deleted query bool false "Return data instead of HTTP 404 if the workspace is deleted"
203203
// @Success 200 {object} codersdk.Workspace
204204
// @Router /users/{user}/workspace/{workspacename} [get]
205205
func (api *API) workspaceByOwnerAndName(rw http.ResponseWriter, r *http.Request) {

docs/api/workspaces.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
180180

181181
### Parameters
182182

183-
| Name | In | Type | Required | Description |
184-
| --------------- | ----- | ------ | -------- | ----------------------------------------------------------- |
185-
| user | path | string | true | Owner username |
186-
| workspacename | path | string | true | Workspace name |
187-
| include_deleted | query | string | false | Return data instead of HTTP 404 if the workspace is deleted |
183+
| Name | In | Type | Required | Description |
184+
| --------------- | ----- | ------- | -------- | ----------------------------------------------------------- |
185+
| user | path | string | true | Owner username |
186+
| workspacename | path | string | true | Workspace name |
187+
| include_deleted | query | boolean | false | Return data instead of HTTP 404 if the workspace is deleted |
188188

189189
### Example responses
190190

@@ -534,7 +534,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id} \
534534
| Name | In | Type | Required | Description |
535535
| --------------- | ----- | ------------ | -------- | ----------------------------------------------------------- |
536536
| id | path | string(uuid) | true | Workspace ID |
537-
| include_deleted | query | string | false | Return data instead of HTTP 404 if the workspace is deleted |
537+
| include_deleted | query | boolean | false | Return data instead of HTTP 404 if the workspace is deleted |
538538

539539
### Example responses
540540

0 commit comments

Comments
 (0)