-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[BUG] Spring generator uses old Swagger dependency #4245
Comments
@dkirrane yes, we've not yet updated the annotation with io.swagger.v3.oas.annotations Is that something you can help us with a PR? |
Would you want to still have the possibility to generate 'old' code, or do you want to replace it with the newer version? |
My take is to replace it with the newer version. If users want the older version, they can use an old version of OpenAPI Generator for that. |
changed dependecies from io.swagger to io.swagger.core.v3 changed imports for annotations for api
updated annotations for simple request
updated annotations and properties for @ApiResponse part of methods
deleted old imports added imports and new annotations to api,pojo and controller
updated samples for using new version of swagger models
updated samples and tests
updated dependencies for examples
updated templates and code for samples in java and spring libs
updated samples client for java libraries and spring-cloud for swagger-annotations with version 2.1.1
updated server samples for java libs and spring cloud
updated dependencies to swagger-annotations(2.1.1) in pom mustache of java libs updated annotations according to swagger-annotations 2.1.1 in pojo, and api mustache of java libs
changed mustaches in spring libs to use it with io.swagger.core.v3 in version 2.1.1 deleted import of old ApiModel and ApiModelProperty in spring libs, io.swagger.core.v3 in version 2.1.1 will be used instead
updated spring samples for client and server to use swagger-annotations 2.1.1
handling security with io.swagger.core.v3 in version 2.1.1 fixed comment
updated spring samples handling security for client and server to use swagger-annotations 2.1.1
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. |
Description
I'm using
openapi-generator-maven-plugin
4.1.3
and thespring
generator uses an old swagger dependency.expected:
actual:
And the generated code uses
import io.swagger.annotations.*
instead of
import io.swagger.v3.oas.annotations.*
The text was updated successfully, but these errors were encountered: