redux-toolkit
redux-toolkit copied to clipboard
@rtk-query/codegen-openapi does not honor `requestBody.content` type
The bug manifests when the openapi.json spec has a requestBody.content other than application/json (for example, application/x-www-form-urlencoded).
The expected outcome is that the generated API should serialize the body into a query string, instead of leaving it as JSON.
To reproduce, check out the API endpoint function that corresponds to the /pet endpoint at https://github.com/reduxjs/redux-toolkit/blob/master/packages/rtk-query-codegen-openapi/test/fixtures/petstore.yaml#L38