Closed x2d7751347m closed 1 year ago
https://github.com/SMILEY4/ktor-swagger-ui/wiki/Request-and-Response-Bodies-Basics
I followed the example in the linked wiki above, However, it is displayed as shown in the picture below.
The function I want is like the picture below. How do I fix it?
Here is the code.
import java.io.File ... post({ request { multipartBody { required = true description = "profile image" mediaType(ContentType.MultiPart.FormData) part<File>("profileImage") { mediaTypes = setOf( ContentType.Image.PNG, ContentType.Image.JPEG, ContentType.Image.GIF ) } part<Metadata>("myMetadata") } } }) { ... }
build.gradle.kts
... dependencies { implementation("io.ktor:ktor-server-swagger-jvm:2.3.2") implementation("io.ktor:ktor-server-openapi:2.3.2") implementation("io.github.smiley4:ktor-swagger-ui:2.2.0") ... }
Hi, thanks for reporting this issue. The bug is fixed with version 2.2.3 which should be available for download now/soon.
https://github.com/SMILEY4/ktor-swagger-ui/wiki/Request-and-Response-Bodies-Basics
I followed the example in the linked wiki above, However, it is displayed as shown in the picture below.
The function I want is like the picture below. How do I fix it?
Here is the code.
build.gradle.kts