[QUESTION][JAVA] Is support for swagger UI 3.0 present?
See original GitHub issueDescription
Hello, I noticed that when I generate the code the generated Swagger UI Configuration class in OpenAPIDocumentationConfig.java
has annotation @EnableSwagger2
. And at the same time I couldn’t find how to remove this annotation since springfox which works with swagger 3.0 requires this annotation to be removed.
My question is swagger UI 3.0 supported, is there a configuration to switch this as the generator also generates the UI (please correct me if I am wrong) along with the clients for the API?
openapi-generator version
5.0.1
OpenAPI declaration file content or url
Its valid I just want the generated UI to be swagger 3.0 and not swagger 2.0
Command line used for generation
java -jar $SCRIPTDIR/openapi-generator-cli.jar generate --generator-name spring --config $SCRIPTDIR/config-spring.json --output ./model -i ./api.yaml
Steps to reproduce
N/A
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/5803 https://github.com/OpenAPITools/openapi-generator/issues/6108
Suggest a fix/enhancement
Not really familiar with the codebase of this project so I was not able to find how the OpenAPIDocumentationConfig.java
is generated. But I suppose if a flag is added with the swagger ui version to the cli the file can be generated properly as per
https://github.com/springfox/springfox/blob/master/README.md#spring-boot-applications
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:10 (1 by maintainers)
Top GitHub Comments
Does anyone have any working solution for this issue? I am using Springboot 2.5.6 and OpenApi Generator 5.3.0
Hey, Is there a solution to this problem? The generator generates code which uses
RelativePathProvider
andEnableSwagger2
and both are deprecated by new springfox versions.we are using:
springfox dependency: