From be5822712e1369beae1885e1bc41773d280713cb Mon Sep 17 00:00:00 2001 From: "Frederick [Bot]" Date: Sat, 7 Sep 2024 11:48:49 +0000 Subject: [PATCH] [skip ci] Updated swagger docs (cherry picked from commit 2539f15dfb62689137e1a68a3ca7cbb8e13ac222) --- pkg/swagger/docs.go | 45 ++++++++++++++++++++++++++++++++++++++-- pkg/swagger/swagger.json | 45 ++++++++++++++++++++++++++++++++++++++-- pkg/swagger/swagger.yaml | 36 ++++++++++++++++++++++++++++++-- 3 files changed, 120 insertions(+), 6 deletions(-) diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 9846cd078..ed708dfcf 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -6202,7 +6202,7 @@ const docTemplate = `{ "JWTKeyAuth": [] } ], - "description": "Returns the current user object.", + "description": "Returns the current user object with their settings.", "consumes": [ "application/json" ], @@ -6217,7 +6217,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/user.User" + "$ref": "#/definitions/v1.UserWithSettings" } }, "404": { @@ -9582,6 +9582,47 @@ const docTemplate = `{ } } }, + "v1.UserWithSettings": { + "type": "object", + "properties": { + "created": { + "description": "A timestamp when this task was created. You cannot change this value.", + "type": "string" + }, + "deletion_scheduled_at": { + "type": "string" + }, + "email": { + "description": "The user's email address.", + "type": "string", + "maxLength": 250 + }, + "id": { + "description": "The unique, numeric id of this user.", + "type": "integer" + }, + "is_local_user": { + "type": "boolean" + }, + "name": { + "description": "The full name of the user.", + "type": "string" + }, + "settings": { + "$ref": "#/definitions/v1.UserSettings" + }, + "updated": { + "description": "A timestamp when this task was last updated. You cannot change this value.", + "type": "string" + }, + "username": { + "description": "The username of the user. Is always unique.", + "type": "string", + "maxLength": 250, + "minLength": 1 + } + } + }, "v1.authInfo": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index e55f8e430..f2acdd5ec 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -6194,7 +6194,7 @@ "JWTKeyAuth": [] } ], - "description": "Returns the current user object.", + "description": "Returns the current user object with their settings.", "consumes": [ "application/json" ], @@ -6209,7 +6209,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/user.User" + "$ref": "#/definitions/v1.UserWithSettings" } }, "404": { @@ -9574,6 +9574,47 @@ } } }, + "v1.UserWithSettings": { + "type": "object", + "properties": { + "created": { + "description": "A timestamp when this task was created. You cannot change this value.", + "type": "string" + }, + "deletion_scheduled_at": { + "type": "string" + }, + "email": { + "description": "The user's email address.", + "type": "string", + "maxLength": 250 + }, + "id": { + "description": "The unique, numeric id of this user.", + "type": "integer" + }, + "is_local_user": { + "type": "boolean" + }, + "name": { + "description": "The full name of the user.", + "type": "string" + }, + "settings": { + "$ref": "#/definitions/v1.UserSettings" + }, + "updated": { + "description": "A timestamp when this task was last updated. You cannot change this value.", + "type": "string" + }, + "username": { + "description": "The username of the user. Is always unique.", + "type": "string", + "maxLength": 250, + "minLength": 1 + } + } + }, "v1.authInfo": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 2776d7ff4..2509e6c21 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -1455,6 +1455,38 @@ definitions: etc. type: integer type: object + v1.UserWithSettings: + properties: + created: + description: A timestamp when this task was created. You cannot change this + value. + type: string + deletion_scheduled_at: + type: string + email: + description: The user's email address. + maxLength: 250 + type: string + id: + description: The unique, numeric id of this user. + type: integer + is_local_user: + type: boolean + name: + description: The full name of the user. + type: string + settings: + $ref: '#/definitions/v1.UserSettings' + updated: + description: A timestamp when this task was last updated. You cannot change + this value. + type: string + username: + description: The username of the user. Is always unique. + maxLength: 250 + minLength: 1 + type: string + type: object v1.authInfo: properties: local: @@ -5819,14 +5851,14 @@ paths: get: consumes: - application/json - description: Returns the current user object. + description: Returns the current user object with their settings. produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/user.User' + $ref: '#/definitions/v1.UserWithSettings' "404": description: User does not exist. schema: