Skip to content

Commit 4c95550

Browse files
committed
fix(openapi): don't panic on requestBody content mime without schema
1 parent 0df984f commit 4c95550

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: pkg/loader/openapi.go

+5
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ func getOpenAPITools(t *openapi3.T, defaultHost, source, targetToolName string)
209209
}
210210
bodyMIME = mime
211211

212+
// requestBody content mime without schema
213+
if content == nil || content.Schema == nil {
214+
continue
215+
}
216+
212217
arg := content.Schema.Value
213218
if arg.Description == "" {
214219
arg.Description = content.Schema.Value.Description

0 commit comments

Comments
 (0)