Closed cubercsl closed 1 year ago
Hey @cubercsl this bug is something we found recently, and we will be solving it very soon Thanks for reporting it, I will keep this issue updated here
yes please update this I'm stuck with a project because of this little thing :-) please please fix asap.
A pr with this is already open #52 I'm testing it, and a new release will be open tomorrow
Try out the new content type option on the latest release (v0.1.4) Here are some examples on how to use it https://github.com/cloudflare/itty-router-openapi#9-custom-responses-formats
As OpenAPI Specification described here, the
content type
of the response is customizable.https://github.com/cloudflare/itty-router-openapi/blob/c9f364a0b1d276b46edca2c04ff14a3a79b8172f/src/route.ts#L34-L40
https://github.com/cloudflare/itty-router-openapi/blob/c9f364a0b1d276b46edca2c04ff14a3a79b8172f/src/parameters.ts#L539-L558
But there is nowhere in the code to define the
Content-Type
of the response, so the generated document will always beapplication/json
.