diff options
Diffstat (limited to 'policy-management/pom.xml')
-rw-r--r-- | policy-management/pom.xml | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/policy-management/pom.xml b/policy-management/pom.xml index fa93fa1c..5cca3085 100644 --- a/policy-management/pom.xml +++ b/policy-management/pom.xml @@ -122,6 +122,80 @@ </resources> </configuration> </execution> + <execution> + <id>copy-swagger</id> + <goals> + <goal>copy-resources</goal> + </goals> + <phase>compile</phase> + <configuration> + <outputDirectory>src/main/resources/swagger</outputDirectory> + <resources> + <resource> + <directory>${basedir}/target/generated-sources/swagger</directory> + <includes> + <include>swagger.json</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + <!-- Controllers interfaces generation --> + <plugin> + <groupId>io.swagger.codegen.v3</groupId> + <artifactId>swagger-codegen-maven-plugin</artifactId> + <version>3.0.27</version> + <executions> + <execution> + <id>code-gen</id> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec> + <invokerPackage>org.onap.policy.drools.server.restful</invokerPackage> + <modelPackage>org.onap.policy.drools.server.restful.model</modelPackage> + <apiPackage>org.onap.policy.drools.server.restful</apiPackage> + <language>jaxrs-spec</language> + <generateModels>false</generateModels> + <generateSupportingFiles>false</generateSupportingFiles> + <sortParamsByRequiredFlag>false</sortParamsByRequiredFlag> + <importMappings> + CoderFilters=org.onap.policy.drools.protocol.coders.EventProtocolCoder.CoderFilters, + CodingResult=org.onap.policy.drools.server.restful.RestManager.CodingResult, + ControllerConfiguration=org.onap.policy.drools.protocol.configuration.ControllerConfiguration, + DroolsController=org.onap.policy.drools.controller.DroolsController, + JsonProtocolFilter=org.onap.policy.drools.protocol.coders.JsonProtocolFilter, + PdpStatistics=org.onap.policy.models.pdp.concepts.PdpStatistics, + PdpdConfiguration=org.onap.policy.drools.protocol.configuration.PdpdConfiguration, + PolicyController=org.onap.policy.drools.system.PolicyController, + PolicyControllerFeatureApi=org.onap.policy.drools.features.PolicyControllerFeatureApi, + PolicyEngine=org.onap.policy.drools.system.PolicyEngine, + PolicyEngineFeatureApi=org.onap.policy.drools.features.PolicyEngineFeatureApi, + PolicyTypeController=org.onap.policy.drools.lifecycle.PolicyTypeController, + Properties=java.util.Properties, + ProtocolCoderToolset=org.onap.policy.drools.protocol.coders.ProtocolCoderToolset, + Response=javax.ws.rs.core.Response, + TopicEndpoint=org.onap.policy.common.endpoints.event.comm.TopicEndpoint, + TopicSink=org.onap.policy.common.endpoints.event.comm.TopicSink, + TopicSource=org.onap.policy.common.endpoints.event.comm.TopicSource, + ToscaPolicy=org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy + </importMappings> + <typeMappings> + <typeMapping>boolean=boolean</typeMapping> + </typeMappings> + <configOptions> + <sourceFolder>src/gen/java</sourceFolder> + <dateLibrary>java11</dateLibrary> + <interfaceOnly>true</interfaceOnly> + <useTags>true</useTags> + <skipIfSpecIsUnchanged>false</skipIfSpecIsUnchanged> + </configOptions> + </configuration> + </execution> </executions> </plugin> </plugins> @@ -287,6 +361,13 @@ <artifactId>awaitility</artifactId> <scope>test</scope> </dependency> + + <!-- Swagger v3 annotations --> + <dependency> + <groupId>io.swagger.core.v3</groupId> + <artifactId>swagger-annotations</artifactId> + <version>${version.swagger.core.v3}</version> + </dependency> </dependencies> </project> |