From 49ad37ddd70d26d4d8d11be9525b89475d1d3b2a Mon Sep 17 00:00:00 2001 From: Gregory Shilin Date: Mon, 30 Jan 2023 11:28:24 +0200 Subject: [PATCH] [SDB-3474] Generated openapi json has the following problems --- pkg/generators/openapi/openapi_generator.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/generators/openapi/openapi_generator.go b/pkg/generators/openapi/openapi_generator.go index cb50e04..667a1e3 100644 --- a/pkg/generators/openapi/openapi_generator.go +++ b/pkg/generators/openapi/openapi_generator.go @@ -372,6 +372,7 @@ func (g *OpenAPIGenerator) generatePathParameter(locator *concepts.Locator) { g.buffer.StartObject("schema") g.buffer.Field("type", "string") g.buffer.EndObject() + g.buffer.Field("required", true) g.buffer.EndObject() } @@ -630,7 +631,7 @@ func (g *OpenAPIGenerator) generateErrorSchema() { g.buffer.StartObject("details") g.generateDescription("Extra information about the error.") g.buffer.Field("type", "object") - g.buffer.Field("additionalProperties", "true") + g.buffer.Field("additionalProperties", true) g.buffer.EndObject() g.buffer.EndObject()