-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
No documented way to handle Mono/Flux without Webflux #523
Comments
You can have a look at the full documentation: For spring-mvc you should use, only the springdoc-openapi-webmvc-core. You should not ship both modules on the same application. If you are using Mono and Flux types on you spring-mvc application (which is not natural), using SpringDocUtils might help achieve clean OpenAPI description as you mentionned. |
There is nothing 'unnatural' in using Mono and Flux in Spring MVC. It is officially supported and documented. What is unnatural is that Springdoc considers a supported configuration 'unnatural'. There is not a single sentence in the documentation supporting what you have written. I still insist this is a bug (at least a bug in the documentation) and:
|
If you feel the documentation for this part is not clear, please feel free to propose a PR to improve it: |
I've run into the same problem. The suggested workaround above is not sufficient for Flux, because just stripping it is not correct, it should be handled as an array.
|
BTW Mono and Flux are not supported. See |
Is this still unsupported? I agree with others that this is a totally valid use case and must be supported |
There are many workarounds for that. |
Describe the bug
To Reproduce
I have Spring MVC (no spring-webflux) application based on Spring Boot 2.2.6 and Springdoc 1.3.0.
My controllers return Flux and Mono.
By default springdoc's swagger-ui page displays Flux response as:
When I include
org.springdoc:springdoc-openapi-webflux-core:1.3.0
my application fails to start:The work-around is to execute:
Expected behavior
This use case should be documented - should springdoc-openapi-webflux-core be used or not used, and if not the documentation should explain how to 'unwrap' Flux and Mono.
The text was updated successfully, but these errors were encountered: