papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

How to properly indicate a application/x-www-form-urlencoded response #130

Closed choffa closed 2 years ago

choffa commented 2 years ago

I was wondering if I could get some guidance in how to indicate that the response media type is application/x-www-form-url-encoded. I found the @FormdataRequest annotation, but cannot seem to find something equivalent for Response.

I am using Jackson for serialization if that matters.

Thanks

Wicpar commented 2 years ago

Hi, there is no form data response, since i haven't written a serializer for it. However you can use the binary response with your content type to send it, even if it's a bit hacky.

If you wish to add it in a PR, you need to add an implementation of ResponseSerializer to MultipartFormDataContentProvider