Fix $ref properties in OpenAPI schema generation

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-24 01:18:00 +00:00
parent df61fdfea1
commit a7267f1df3

View File

@@ -170,7 +170,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
{
["application/json"] = new
{
schema = new { @ref = "#/components/schemas/DeviceCommand" }
schema = new Dictionary<string, object> { ["$ref"] = "#/components/schemas/DeviceCommand" }
}
}
};
@@ -276,9 +276,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
type = "object",
properties = new Dictionary<string, object>
{
["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<string, object> { ["$ref"] = "#/components/schemas/BoolFeedback" } },
["IntValues"] = new { type = "array", items = new Dictionary<string, object> { ["$ref"] = "#/components/schemas/IntFeedback" } },
["SerialValues"] = new { type = "array", items = new Dictionary<string, object> { ["$ref"] = "#/components/schemas/StringFeedback" } }
}
},
["BoolFeedback"] = new
@@ -314,7 +314,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
properties = new Dictionary<string, object>
{
["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<string, object> { ["$ref"] = "#/components/schemas/Route" } }
}
},
["Route"] = new