Add swagger models for swagger endpoint generation 46/122446/5
authorliamfallon <liam.fallon@est.tech>
Tue, 6 Jul 2021 08:53:17 +0000 (09:53 +0100)
committerliamfallon <liam.fallon@est.tech>
Wed, 7 Jul 2021 14:48:29 +0000 (15:48 +0100)
The swagger models dependency is required to generate the swagger for
the Swagger endpoint in Springboot applications.

Springboot needs Jackson annotations as well.

Issue https://jira.onap.org/browse/POLICY-3465 opened for the general
Swagger upgrade work.

Issue-ID: POLICY-3424
Change-Id: Ie86db5652be26df085234f0699f0363081d06af0
Signed-off-by: liamfallon <liam.fallon@est.tech>
participant/participant-impl/participant-impl-simulator/src/main/java/org/onap/policy/clamp/controlloop/participant/simulator/main/rest/ParticipantErrorController.java
pom.xml
runtime/pom.xml

index d4429b8..695ae06 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.policy.clamp.controlloop.participant.simulator.main.rest;
 
-import io.swagger.v3.oas.annotations.Hidden;
 import java.util.Map;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.http.HttpServletRequest;
@@ -38,7 +37,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.context.request.ServletWebRequest;
 
 @Controller
-@Hidden
 public class ParticipantErrorController implements ErrorController {
 
     private final ErrorAttributes errorAttributes;
diff --git a/pom.xml b/pom.xml
index eb8b58a..da214ff 100644 (file)
--- a/pom.xml
+++ b/pom.xml
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>${version.jackson}</version>
+        </dependency>
         <dependency>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-boot-starter</artifactId>
index 6efdec7..4c8bf24 100644 (file)
             <artifactId>docker-java</artifactId>
             <scope>test</scope>
         </dependency>
-        <!-- Swagger models for swagger generation -->
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-models</artifactId>
-            <version>${version.swagger}</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>