Open ashishjullia opened 1 year ago
Hey there, currently request bodies other than application/json
are not supported in itty-router-openapi
can you explain what are you trying to do here, so i can suggest a different approach?
When using conntent type application/json
you don't need to set that parameter, just define your schema
@G4brym Thanks for the information but I just wanted to understand whether there is a way or not for example I wanted to change the contentType to any of these:
text/plain; charset=utf-8
application/json
application/vnd.github+json
application/vnd.github.v3+json
application/vnd.github.v3.raw+json
application/vnd.github.v3.text+json
application/vnd.github.v3.html+json
application/vnd.github.v3.full+json
application/vnd.github.v3.diff
application/vnd.github.v3.patch
isn't application/vnd.github.v3.html+json
or any other that you've listed there just json under the hood?
if yes you can still use itty-router-openapi
without a clear example of what you are trying to do, i cannot help you
@ashishjullia do you know where on the roadmap support for other request bodies is?
Would a PR be helpful?
@ExSidius what request bodies types are you looking for?
I think as an example the image
or binary
content type could be good for uploading images (to an R2 bucket for example)
Or even the formData
type
When using the following:
It shows:
I know I'm missing something but how to correctly pass this
contentType
and where?