Skip to content

Commit

Permalink
[SDB-3474] Generated openapi json has the following problems
Browse files Browse the repository at this point in the history
  • Loading branch information
gshilin-sdb committed Jan 30, 2023
1 parent 92c5d3a commit 49ad37d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/generators/openapi/openapi_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 49ad37d

Please sign in to comment.