From dc228b4734b1f4973b3c242f4f94eb306b0f2232 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 (cherry picked from commit 5926ed1f73891c9eafbf4045cc4577dc7e89496d) --- 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 12d89d3049..678e6a1c6f 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -25014,10 +25014,7 @@ "UserSettings": { "description": "UserSettings", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserSettings" - } + "$ref": "#/definitions/UserSettings" } }, "WatchInfo": {