From 0b928b97710a3dd24db743156306dd5a9b1aa753 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 17:58:28 +0200 Subject: [PATCH] [release-11.6.8] Dashboards: Return the correct model in openapi spec (#112868) Return the correct model (#112858) (cherry picked from commit 0ba040e866e1493baf09551ae845e8e2666483b6) Co-authored-by: Selene --- pkg/api/dashboard.go | 2 +- public/api-merged.json | 19 +++++++++++++++---- public/openapi3.json | 19 +++++++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go index 532e79c766c..76781fceae9 100644 --- a/pkg/api/dashboard.go +++ b/pkg/api/dashboard.go @@ -1453,7 +1453,7 @@ type GetHomeDashboardResponseBody struct { // swagger:response dashboardVersionsResponse type DashboardVersionsResponse struct { // in: body - Body []dashver.DashboardVersionMeta `json:"body"` + Body *dashver.DashboardVersionResponseMeta `json:"body"` } // swagger:response dashboardVersionResponse diff --git a/public/api-merged.json b/public/api-merged.json index 0fda309a927..9ae1df23cbc 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -12170,6 +12170,20 @@ } } }, + "DashboardVersionResponseMeta": { + "type": "object", + "properties": { + "continueToken": { + "type": "string" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/DashboardVersionMeta" + } + } + } + }, "DataLink": { "description": "DataLink define what", "type": "object", @@ -20329,10 +20343,7 @@ "dashboardVersionsResponse": { "description": "(empty)", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardVersionMeta" - } + "$ref": "#/definitions/DashboardVersionResponseMeta" } }, "deleteCorrelationResponse": { diff --git a/public/openapi3.json b/public/openapi3.json index 358536ee9e9..42702eac80f 100644 --- a/public/openapi3.json +++ b/public/openapi3.json @@ -447,10 +447,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/DashboardVersionMeta" - }, - "type": "array" + "$ref": "#/components/schemas/DashboardVersionResponseMeta" } } }, @@ -4182,6 +4179,20 @@ }, "type": "object" }, + "DashboardVersionResponseMeta": { + "properties": { + "continueToken": { + "type": "string" + }, + "versions": { + "items": { + "$ref": "#/components/schemas/DashboardVersionMeta" + }, + "type": "array" + } + }, + "type": "object" + }, "DataLink": { "description": "DataLink define what", "properties": {