springdoc / springdoc-openapi-maven-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
141 stars 37 forks source link

There is no way to generate multiple open api files in one plugin config #48

Closed pkukharenka closed 1 year ago

pkukharenka commented 1 year ago

Plugin configuration is global for the whole plugin. There is no way to do something like below:


    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-maven-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            <id>admin-api-generation</id>
            <phase>integration-test</phase>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <apiDocsUrl>http://localhost:8080/v3/api-docs/admin</apiDocsUrl>
                <outputFileName>openapi-admin.json</outputFileName>
                <outputDir>${project.build.directory}</outputDir>
            </configuration>
        </execution>
        <execution>
            <id>user-api-generation</id>
            <phase>integration-test</phase>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <apiDocsUrl>http://localhost:8080/v3/api-docs/user</apiDocsUrl>
                <outputFileName>openapi-user.json</outputFileName>
                <outputDir>${project.build.directory}</outputDir>
            </configuration>
        </execution>
    </executions>
</plugin>`
bnasslahsen commented 1 year ago

@pkukharenka,

This should work!