From 5926ed1f73891c9eafbf4045cc4577dc7e89496d Mon Sep 17 00:00:00 2001 From: Gusted Date: Wed, 19 Jun 2024 07:15:34 +0200 Subject: [PATCH] [SWAGGER] Make it consistent with reality - Make the `UserSettings` definition an non-array, this is consistent with the existing endpoints that uses this definition. - Resolves #4179 --- routers/api/v1/swagger/user.go | 2 +- templates/swagger/v1_json.tmpl | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/routers/api/v1/swagger/user.go b/routers/api/v1/swagger/user.go index fb6d185ee7..37e28664fb 100644 --- a/routers/api/v1/swagger/user.go +++ b/routers/api/v1/swagger/user.go @@ -46,5 +46,5 @@ type swaggerResponseUserHeatmapData struct { // swagger:response UserSettings type swaggerResponseUserSettings struct { // in:body - Body []api.UserSettings `json:"body"` + Body api.UserSettings `json:"body"` } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index f68b1cbe2f..f11e67d4ad 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -26540,10 +26540,7 @@ "UserSettings": { "description": "UserSettings", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserSettings" - } + "$ref": "#/definitions/UserSettings" } }, "VariableList": {