Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt committed Jun 26, 2024
1 parent ca9590d commit 4d1d8f0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ func RegisterOpenAPIOperation[T, B any](s *Server, method, path string) (*openap
s.OpenApiSpec.Components.Schemas[bodyTag] = bodySchema

content := openapi3.NewContentWithSchema(bodySchema.Value, []string{"application/json"})
content["application/json"].Schema.Ref = "#/components/schemas/" + bodyTag
requestBody := openapi3.NewRequestBody().
WithRequired(true).
WithDescription("Request body for " + reflect.TypeOf(*new(B)).String()).
Expand All @@ -196,7 +195,6 @@ func RegisterOpenAPIOperation[T, B any](s *Server, method, path string) (*openap
s.OpenApiSpec.Components.Schemas[tag] = responseSchema

content := openapi3.NewContentWithSchema(responseSchema.Value, []string{"application/json"})
content["application/json"].Schema.Ref = "#/components/schemas/" + tag
response := openapi3.NewResponse().
WithDescription("OK").
WithContent(content)
Expand Down

0 comments on commit 4d1d8f0

Please sign in to comment.