summaryrefslogtreecommitdiffstats
path: root/policy-management/pom.xml
diff options
context:
space:
mode:
authorlapentafd <francesco.lapenta@est.tech>2023-02-07 15:48:03 +0000
committerFrancesco Davide Lapenta <francesco.lapenta@est.tech>2023-02-10 15:07:04 +0000
commit0a07999ae3b27154249de5744c4b20fbb627dcdb (patch)
tree647b58bf7d6fa718a0bdeb993006c05f0f2d7e0d /policy-management/pom.xml
parent62e8960e2969f24c7f7bfca5c696b8975ec8e81d (diff)
Removing Drools-pdp swagger annotations
Added swagger extracted documentation in openapi.yaml for lifecycle, legacy, management and healthcheck. Added new endpoint to retrieve the generated swagger.json Modified endpoint in telemetry tool Issue-ID: POLICY-3465 Change-Id: I003aaf128b1a4991ffe6b79f0659d1bd0137b52d Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'policy-management/pom.xml')
-rw-r--r--policy-management/pom.xml81
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>