OpenAPITools / OpenAPITools/openapi-generator
[QUESTION][JAVA] Is support for swagger UI 3.0 present?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review related issues #5803 and #6108, then trace how the spring generator produces OpenAPIDocumentationConfig.java from the shown generation command. Done means establishing whether Swagger UI 3.0 is supported and, if a change is required, defining the configuration needed so generated output does not use @EnableSwagger2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100