-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal - Support Multipart request data via a new annotation #45
Comments
For anyone that wants to get around this in the meantime, here's what I'm doing:
|
Copying @tabilzad 's response from slack:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you ever had to work with multipart data uploads? When used with resource based routing, the route looks like:
Unfortunately this generates a scheme reference in the openapi spec and it doesn't really work as expected. Which is fine, because it doesn't seem like ktor-docs advertises multipart support.
Here is what is generated:
but it should be something like:
I think the best way to support this is probably via an annotation, because its additional information outside of the ktor request (contentType is at least, so we might as well take it all in via annotation). It would be nice if we could utilize @KtorFieldDescription for the properties in the multipart upload, but it would require a small refactor which would increase its responsibilities.
OpenAPI reference - https://swagger.io/docs/specification/v3_0/describing-request-body/multipart-requests/
Ktor reference - https://ktor.io/docs/server-requests.html#form_data
The text was updated successfully, but these errors were encountered: