according to Swagger Open API 3.0 is it possible to reuse components parameters as requestBody properties?

Viewed 392

Reading the Open API 3.0 specs, I see that parameters can be defined in the components section and thus reused for multiple paths with their relative GET operations.

Is there any way of reusing components/parameters for a different operation on the same path? In my API I allow GET and POST to be used interchangeably (no data ever needs to be written, it's only read), with the same parameters. However in the Open API json representation, a GET operation can take query parameters whereas a POST operation would take properties in the requestBody. Are parameters and properties not interchangeable in the Open API 3.0 spec?

0 Answers
Related