File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ fn request_body_params(
337337 }
338338 ReferenceOr :: Item ( body) => {
339339 for ( content_type, media_type) in & body. content {
340- if content_type. starts_with ( "application/json" ) {
340+ if content_type. starts_with ( "application/json" ) || content_type == "*/*" {
341341 let schema = match & media_type. schema {
342342 None => Err ( Error :: unimplemented ( "JSON content without schema." ) ) ,
343343 Some ( schema) => Ok ( schema) ,
@@ -368,7 +368,7 @@ fn request_body_params(
368368 kind: ParamKind :: Body ,
369369 } ] ,
370370 ) ;
371- } else if content_type == "application/x-yaml" {
371+ } else if content_type. contains ( "application/x-yaml" ) {
372372 let schema = match & media_type. schema {
373373 None => Err ( Error :: unimplemented ( "YAML content without schema." ) ) ,
374374 Some ( schema) => Ok ( schema) ,
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ fn schema_type(
250250 SchemaKind :: Not { .. } => Err ( Error :: unimplemented ( "Not parameter is not supported." ) ) ,
251251 SchemaKind :: Any ( _) => {
252252 if let Some ( content_type) = content_type {
253- if & content_type == "application/json" {
253+ if & content_type == "application/json" || & content_type == "*/*" {
254254 Ok ( DataType :: Json )
255255 } else if & content_type == "application/x-yaml" {
256256 Ok ( DataType :: Yaml )
You can’t perform that action at this time.
0 commit comments