From 2791be107a4a50fcae7a3f98affcd5efc424e0db Mon Sep 17 00:00:00 2001 From: Kira Pilot Date: Mon, 27 Nov 2023 17:00:20 +0000 Subject: [PATCH] fix: docuemnt workspace filter query param correctly --- coderd/apidoc/docs.go | 2 +- coderd/apidoc/swagger.json | 2 +- coderd/workspaces.go | 2 +- docs/api/workspaces.md | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 62706dcc84c32..bbf238df73e60 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -6149,7 +6149,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "Search query in the format ` + "`" + `key:value` + "`" + `. Available keys are: owner, template, name, status, has-agent, deleting_by.", + "description": "Search query in the format ` + "`" + `key:value` + "`" + `. Available keys are: owner, template, name, status, has-agent, is-dormant, last_used_after, last_used_before.", "name": "q", "in": "query" }, diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index 8cd174fd3c198..a692f7258e981 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -5419,7 +5419,7 @@ "parameters": [ { "type": "string", - "description": "Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, deleting_by.", + "description": "Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, is-dormant, last_used_after, last_used_before.", "name": "q", "in": "query" }, diff --git a/coderd/workspaces.go b/coderd/workspaces.go index 039d733e27261..b41428b26a3ae 100644 --- a/coderd/workspaces.go +++ b/coderd/workspaces.go @@ -117,7 +117,7 @@ func (api *API) workspace(rw http.ResponseWriter, r *http.Request) { // @Security CoderSessionToken // @Produce json // @Tags Workspaces -// @Param q query string false "Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, deleting_by." +// @Param q query string false "Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, is-dormant, last_used_after, last_used_before." // @Param limit query int false "Page limit" // @Param offset query int false "Page offset" // @Success 200 {object} codersdk.WorkspacesResponse diff --git a/docs/api/workspaces.md b/docs/api/workspaces.md index 209d7f34d2bac..7d0f7973d4425 100644 --- a/docs/api/workspaces.md +++ b/docs/api/workspaces.md @@ -455,11 +455,11 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \ ### Parameters -| Name | In | Type | Required | Description | -| -------- | ----- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------ | -| `q` | query | string | false | Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, deleting_by. | -| `limit` | query | integer | false | Page limit | -| `offset` | query | integer | false | Page offset | +| Name | In | Type | Required | Description | +| -------- | ----- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `q` | query | string | false | Search query in the format `key:value`. Available keys are: owner, template, name, status, has-agent, is-dormant, last_used_after, last_used_before. | +| `limit` | query | integer | false | Page limit | +| `offset` | query | integer | false | Page offset | ### Example responses