Skip to content

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

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

Closed
fethiyildiz opened this issue Sep 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fethiyildiz
Copy link

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<*> {
    }
@sebastianfilke
Copy link

I have the exact same problem in my application. Could you also please update the 1.x.x springdoc versions for this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants