Skip to content

[BUG][spring] Version number for Swagger2 annotation library has invalid character #15828

@ddeath

Description

@ddeath

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When you enable annotationLibrary = swagger2 it will generate pom.xml file which will contain invalid dependency version - it will contain }
Then when we try to publish package generate with generator it will fail with:

Failed to execute goal on project XYZ Could not resolve dependencies for project XYZ:jar:1.0.1-SNAPSHOT: Could not find artifact io.swagger.core.v3:swagger-annotations:jar:}2.1.13 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
openapi-generator version

6.4.0
but I checked the code on master and it also contains this bug

OpenAPI declaration file content or url

this is not specific to the openapi declaration file

Generation Details

Problematic line is: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache#L25 - see that there is unwanted character before version number

Steps to reproduce

use annotationLibrary=swagger2 with spring generator

Related issues/PRs
Suggest a fix

Removing that unwanted character.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions