From 9c8ea027ef8c5d62302f81aed7a94e8523b6291b Mon Sep 17 00:00:00 2001 From: zzjin Date: Thu, 30 Mar 2023 18:39:14 +0800 Subject: [PATCH] feat: add the missing userId param docs for get-user API (#1698) * Add roles to SAML response * Fix: Add back missing get-user userId param doc. Signed-off-by: zzjin * Update user.go --------- Signed-off-by: zzjin Co-authored-by: Yang Luo --- controllers/user.go | 1 + swagger/swagger.json | 14 ++++++++++---- swagger/swagger.yml | 12 ++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index d0a97d6e..08608c74 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -84,6 +84,7 @@ func (c *ApiController) GetUsers() { // @Param owner query string false "The owner of the user" // @Param email query string false "The email of the user" // @Param phone query string false "The phone of the user" +// @Param userId query string false "The userId of the user" // @Success 200 {object} object.User The Response object // @router /get-user [get] func (c *ApiController) GetUser() { diff --git a/swagger/swagger.json b/swagger/swagger.json index 64c4533a..fad042a3 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -2171,6 +2171,12 @@ "name": "phone", "description": "The phone of the user", "type": "string" + }, + { + "in": "query", + "name": "userId", + "description": "The userId of the user", + "type": "string" } ], "responses": { @@ -3638,11 +3644,11 @@ } }, "definitions": { - "2306.0xc0000a7410.false": { + "2306.0xc0003a4480.false": { "title": "false", "type": "object" }, - "2340.0xc0000a7440.false": { + "2340.0xc0003a44b0.false": { "title": "false", "type": "object" }, @@ -3776,10 +3782,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/2306.0xc0000a7410.false" + "$ref": "#/definitions/2306.0xc0003a4480.false" }, "data2": { - "$ref": "#/definitions/2340.0xc0000a7440.false" + "$ref": "#/definitions/2340.0xc0003a44b0.false" }, "msg": { "type": "string" diff --git a/swagger/swagger.yml b/swagger/swagger.yml index 21a3f1d8..1c4a5088 100644 --- a/swagger/swagger.yml +++ b/swagger/swagger.yml @@ -1417,6 +1417,10 @@ paths: name: phone description: The phone of the user type: string + - in: query + name: userId + description: The userId of the user + type: string responses: "200": description: The Response object @@ -2381,10 +2385,10 @@ paths: schema: $ref: '#/definitions/Response' definitions: - 2306.0xc0000a7410.false: + 2306.0xc0003a4480.false: title: "false" type: object - 2340.0xc0000a7440.false: + 2340.0xc0003a44b0.false: title: "false" type: object LaravelResponse: @@ -2476,9 +2480,9 @@ definitions: type: object properties: data: - $ref: '#/definitions/2306.0xc0000a7410.false' + $ref: '#/definitions/2306.0xc0003a4480.false' data2: - $ref: '#/definitions/2340.0xc0000a7440.false' + $ref: '#/definitions/2340.0xc0003a44b0.false' msg: type: string name: