Skip to content

Commit

Permalink
Merge pull request #188 from gshilin-sdb/SDB-3474_generated_openapi_j…
Browse files Browse the repository at this point in the history
…son_has_the_following_problems

[SDB-3474] Generated openapi json has the following problems
  • Loading branch information
jhernand authored Jan 30, 2023
2 parents 92c5d3a + 49ad37d commit 0c9f0aa
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 0c9f0aa

Please sign in to comment.