From a7267f1df3700d7409b3c86a4685d7cfbf7856fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 24 Jul 2025 01:18:00 +0000 Subject: [PATCH] Fix $ref properties in OpenAPI schema generation Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com> --- .../Web/RequestHandlers/SwaggerHandler.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SwaggerHandler.cs b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SwaggerHandler.cs index 635e2fc6..6cf11cd8 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SwaggerHandler.cs +++ b/src/PepperDash.Essentials.Core/Web/RequestHandlers/SwaggerHandler.cs @@ -170,7 +170,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers { ["application/json"] = new { - schema = new { @ref = "#/components/schemas/DeviceCommand" } + schema = new Dictionary { ["$ref"] = "#/components/schemas/DeviceCommand" } } } }; @@ -276,9 +276,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers type = "object", properties = new Dictionary { - ["BoolValues"] = new { type = "array", items = new { @ref = "#/components/schemas/BoolFeedback" } }, - ["IntValues"] = new { type = "array", items = new { @ref = "#/components/schemas/IntFeedback" } }, - ["SerialValues"] = new { type = "array", items = new { @ref = "#/components/schemas/StringFeedback" } } + ["BoolValues"] = new { type = "array", items = new Dictionary { ["$ref"] = "#/components/schemas/BoolFeedback" } }, + ["IntValues"] = new { type = "array", items = new Dictionary { ["$ref"] = "#/components/schemas/IntFeedback" } }, + ["SerialValues"] = new { type = "array", items = new Dictionary { ["$ref"] = "#/components/schemas/StringFeedback" } } } }, ["BoolFeedback"] = new @@ -314,7 +314,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers properties = new Dictionary { ["url"] = new { type = "string", description = "Base URL for the API" }, - ["routes"] = new { type = "array", items = new { @ref = "#/components/schemas/Route" } } + ["routes"] = new { type = "array", items = new Dictionary { ["$ref"] = "#/components/schemas/Route" } } } }, ["Route"] = new