Skip to content

Commit

Permalink
fix(openapi): don't panic on requestBody content mime without schema (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rinor authored Aug 15, 2024
1 parent 2e880ed commit 91a5df6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/loader/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ func getOpenAPITools(t *openapi3.T, defaultHost, source, targetToolName string)
}
bodyMIME = mime

// requestBody content mime without schema
if content == nil || content.Schema == nil {
continue
}

arg := content.Schema.Value
if arg.Description == "" {
arg.Description = content.Schema.Value.Description
Expand Down

0 comments on commit 91a5df6

Please sign in to comment.