Created
November 19, 2020 16:26
-
-
Save splatch/bbe62afdbfe3cf41221c0794620bc0fd to your computer and use it in GitHub Desktop.
Fragment of maven plugin configuration to get jaxrs stubs out of openapi generator plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.openapitools</groupId> | |
<artifactId>openapi-generator-maven-plugin</artifactId> | |
<version>4.3.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<inputSpec>${project.basedir}/src/main/openapi/v1/openapi.yaml</inputSpec> | |
<generatorName>jaxrs-spec</generatorName> | |
<output>${project.build.directory}/openapi</output> | |
<strictSpec>true</strictSpec> | |
<configOptions> | |
<interfaceOnly>true</interfaceOnly> | |
<returnResponse>false</returnResponse> | |
<generatePom>false</generatePom> | |
<useSwaggerAnnotations>false</useSwaggerAnnotations> | |
</configOptions> | |
<apiPackage>cloud.connectorio.services.core.asset.resources.v1</apiPackage> | |
<modelPackage>cloud.connectorio.services.core.asset.resources.v1.model</modelPackage> | |
<generateModelTests>false</generateModelTests> | |
<generateApiTests>false</generateApiTests> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<version>3.1.0</version> | |
<executions> | |
<execution> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>add-source</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<sources> | |
<source>${project.build.directory}/openapi/src/gen/java</source> | |
</sources> | |
</configuration> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment