Skip to content
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

Migration from swagger codegen 3.0.21 to 3.0.23 fails due to compilation errors #795

Closed
SlavchoArsovski opened this issue Nov 6, 2020 · 1 comment · Fixed by #796
Closed

Comments

@SlavchoArsovski
Copy link

Hi Swagger Codegen team,

I tried to migrate from 3.0.21 to 3.0.23 because of included feature of OAS3 annotations in Spring Java.
During the migration i found 2 issues:

  1. Generating SwaggerDocumentationConfig.java fails to compile because in SwaggerDocumentationConfig.mustache there is 2 imports with same class name from two different packages:
    import io.swagger.v3.oas.models.info.Contact;
    import springfox.documentation.service.Contact;

  2. Having default value on query parameter generates following code:
    schema:
    name: 'offset'
    in: "query"
    description: 'Position of first item returned'
    required: false
    schema:
    type: integer
    format: int32
    example: 100
    default: 0

@parameter(in = ParameterIn.QUERY, description = "Position of first item returned" ,schema=@Schema(, defaultValue="0")) @Valid @RequestParam(value = "offset", required = false, defaultValue="0") Integer offset
---> schema=@Schema(, defaultValue="0")) has obsolete comma "," which makes the file with compile error

Best,
Slavcho

@reta
Copy link
Contributor

reta commented Nov 6, 2020

@HugoMario that's on me, fix has been submitted (#796)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants