[BUG] Spring generator uses old Swagger dependency
See original GitHub issueDescription
I’m using openapi-generator-maven-plugin
4.1.3
and the spring
generator uses an old swagger dependency.
expected:
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.0.10</version>
</dependency>
actual:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.23</version>
</dependency>
And the generated code uses import io.swagger.annotations.*
instead of import io.swagger.v3.oas.annotations.*
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Bug in OpenAPI generator? Wrong format for the example ...
I would like have a example like in my yaml file. In YYYY-MM-DD format. I'm using: <dependency> <groupId>io.springfox</groupId> ...
Read more >Spring Boot - Enabling Swagger2 - Tutorialspoint
To enable the Swagger2 in Spring Boot application, you need to add the following dependencies in our build configurations file. <dependency> <groupId>io.
Read more >Swagger: API Documentation & Design Tools for Teams
Simplify API development for users, teams, and enterprises with our open source and professional toolset. Find out how Swagger can help you and...
Read more >Generate client code from Spring Boot using Maven
Alternatively, you may find use in combining the GenerateSwagger test class from my previous article on the subject with either the Swagger Codegen...
Read more >F.A.Q - Springdoc-openapi
For example, lets assume you want load the swagger-ui in spring-mvc application: You mainly, need to add the springdoc-openapi module. <dependency> ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any idea on when this will be fixed?
Currently, generating code from an OAP3 spec leaves you no other option than to expose a Swagger 2 spec.
This is not due to the annotations. You can perfectly generate an OAS3 from old swagger annotations. The fact that a Swagger2 spec is exposed comes from the lib used to generate it (probably springfox v2 ?). You can upgrade to Springfox v3 which supports generating OAS3 specs.