Skip to content

Maven plugin generating wrong openapi version on plugin version 2.2.30 and 2.2.32 #4907

Closed

Description

@thiagohora

I have the following configuration, where my openapi_template.yml file is a template that specifies openapi: 3.1.0. This works fine on version 2.2.28 but when upgrading to versions 2.2.32 or 2.2.30 the generated file uses openapi: 3.0.1

            <plugin>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-maven-plugin-jakarta</artifactId>
                <version>${swagger.version}</version>
                <configuration>
                    <outputFileName>openapi</outputFileName>
                    <outputPath>${project.build.directory}</outputPath>
                    <outputFormat>YAML</outputFormat>
                    <openapiFilePath>${project.basedir}/src/main/resources/openapi_template.yml</openapiFilePath>
                    <ignoredRoutes>/application.wadl</ignoredRoutes>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>resolve</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Activity

  1. added a commit that references this issue on Jun 11, 2025
  2. added a commit that references this issue on Jun 12, 2025
  3. daniel-kmiecik commented on Jun 12, 2025

    @daniel-kmiecik
    Collaborator

    Issue about "custom" openapi version being overwritten is fixed by #4912. I noticed that you are targeting 3.1.x version (in your template file), in this case you would also need to set the flag openapi31=true to correctly process oas 3.1 constructs and get the correct output. Please also check wiki about 3.1 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions