Skip to content

Update dependency versions to add boundary specific Content Type support for Multipart requests #2382

Closed
@fethiyildiz

Description

@fethiyildiz

Is your feature request related to a problem? Please describe.

Hello,

Latest version (2.2.0) of springdoc-openapi-starter-webmvc-ui library doesn't support content type for multipart requests.

This problem already addressed below;
#820 (comment)

Swagger UI finally fixed these issues.

This is the issue;
swagger-api/swagger-ui#5356 (comment)

And this is the pull request;
swagger-api/swagger-ui#9105

Also webjars/swagger-ui library bring this feature with 5.4.2 version;
webjars/swagger-ui#196

But when i looked the pom, i saw latest version of (2.2.0) uses 5.2.0 version of webjars/swagger-ui library.
But this feature came with 5.4.2 release so could you update webjars/swagger-ui dependency version please?

image

Describe alternatives you've considered

I tried to override webjars dependency version like below;
But somehow swagger-ui docs doesn't generated. Because i can't see any logs for "docs generated" like before.
Also when i try to call swagger ui link it gives me 404 Not Found.
But i don't know why this is happening.

image image

Additional context

Example code, i needed boundary specific content type;

@PostMapping("/admin/activities", consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
    @RequestBody(content = [Content(encoding = [Encoding(name = "activityDto", contentType = "application/json")])])
    fun createActivity(@RequestPart(name = "activityDto") request: CreateActivityRequest, @RequestPart image: MultipartFile): ResponseEntity<*> {
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions