Ask a Question

What goes in RequestBody content field?

bamalone
New Contributor

What goes in RequestBody content field?

The OAS indicates that a Request Body contains the content field which should be of type Media Type but it seems that the top level object within the content field is really content-type and then that contains the schema. Why is there a disconnect here? Am I misunderstanding the documentation? Shouldn't Request Body's content field be content-type rather than media type?

 

the documentation I refer to is here https://swagger.io/specification/#request-body-object

1 REPLY 1
bamalone
New Contributor

Ah, I see that the key should be the content type and the value is the Media type.

cancel
Showing results for 
Search instead for 
Did you mean: