From ec29f6cb60204c6803d6354dc508ab91d01f72e2 Mon Sep 17 00:00:00 2001 From: xavi <114113189+volcanonoodle@users.noreply.github.com> Date: Fri, 28 Feb 2025 13:41:58 +0100 Subject: [PATCH] Add OpenAPI annotations for query params of `getOrgUsersForCurrentOrg` API route (#101419) --- pkg/api/org_users.go | 10 ++++++++++ public/api-merged.json | 13 +++++++++++++ public/openapi3.json | 17 +++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/pkg/api/org_users.go b/pkg/api/org_users.go index 1b83b4e3b77..4dd9e444fb3 100644 --- a/pkg/api/org_users.go +++ b/pkg/api/org_users.go @@ -542,6 +542,16 @@ type AddOrgUserParams struct { OrgID int64 `json:"org_id"` } +// swagger:parameters getOrgUsersForCurrentOrg +type GetOrgUsersForCurrentOrgParams struct { + // in:query + // required:false + Query string `json:"query"` + // in:query + // required:false + Limit int `json:"limit"` +} + // swagger:parameters getOrgUsersForCurrentOrgLookup type LookupOrgUsersParams struct { // in:query diff --git a/public/api-merged.json b/public/api-merged.json index 9ddc287f6f6..990ca6cbc86 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -6457,6 +6457,19 @@ ], "summary": "Get all users within the current organization.", "operationId": "getOrgUsersForCurrentOrg", + "parameters": [ + { + "type": "string", + "name": "query", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "limit", + "in": "query" + } + ], "responses": { "200": { "$ref": "#/responses/getOrgUsersForCurrentOrgResponse" diff --git a/public/openapi3.json b/public/openapi3.json index 8f339a39b59..784e75b95cf 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -20308,6 +20308,23 @@ "get": { "description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", "operationId": "getOrgUsersForCurrentOrg", + "parameters": [ + { + "in": "query", + "name": "query", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "format": "int64", + "type": "integer" + } + } + ], "responses": { "200": { "$ref": "#/components/responses/getOrgUsersForCurrentOrgResponse"