NONRTRIC Minor changes 02/128102/1
authorPatrikBuhr <patrik.buhr@est.tech>
Fri, 25 Mar 2022 14:39:06 +0000 (15:39 +0100)
committerPatrikBuhr <patrik.buhr@est.tech>
Fri, 25 Mar 2022 14:39:06 +0000 (15:39 +0100)
Some version updated and changes related to swagger documentation generation.

Issue-ID: CCSDK-3560
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Change-Id: I59311f5fd09face79e9dce185c65374522dcb40e

a1-policy-management/api/pms-api.json
a1-policy-management/api/pms-api.yaml
a1-policy-management/pom.xml
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/SwaggerConfig.java
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationController.java
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RicRepositoryController.java
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java
a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/StatusController.java
a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/RappSimulatorController.java

index 91ad1b7..2b8fb73 100644 (file)
             ],
             "tags": ["A1 Policy Management"]
         }},
+        "/actuator/threaddump": {"get": {
+            "summary": "Actuator web endpoint 'threaddump'",
+            "operationId": "threaddump_2",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/a1-policy/v2/status": {"get": {
             "summary": "Returns status and statistics of this service",
             "operationId": "getStatus",
             }},
             "tags": ["Health Check"]
         }},
-        "/actuator/threaddump": {"get": {
-            "summary": "Actuator web endpoint 'threaddump'",
-            "operationId": "threaddump_4",
+        "/actuator/loggers": {"get": {
+            "summary": "Actuator web endpoint 'loggers'",
+            "operationId": "loggers",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
+        "/actuator/health/**": {"get": {
+            "summary": "Actuator web endpoint 'health-path'",
+            "operationId": "health-path",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
             ],
             "tags": ["NearRT-RIC Repository"]
         }},
-        "/actuator/loggers": {"get": {
-            "summary": "Actuator web endpoint 'loggers'",
-            "operationId": "loggers_2",
-            "responses": {"200": {
-                "description": "OK",
-                "content": {"*/*": {"schema": {"type": "object"}}}
-            }},
-            "tags": ["Actuator"]
-        }},
-        "/actuator/health/**": {"get": {
-            "summary": "Actuator web endpoint 'health-path'",
-            "operationId": "health-path_2",
-            "responses": {"200": {
-                "description": "OK",
-                "content": {"*/*": {"schema": {"type": "object"}}}
-            }},
-            "tags": ["Actuator"]
-        }},
         "/a1-policy/v2/policy-types": {"get": {
             "summary": "Query policy type identities",
             "operationId": "getPolicyTypes",
         },
         "/actuator/metrics/{requiredMetricName}": {"get": {
             "summary": "Actuator web endpoint 'metrics-requiredMetricName'",
-            "operationId": "metrics-requiredMetricName_2",
+            "operationId": "metrics-requiredMetricName",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
         },
         "/actuator": {"get": {
             "summary": "Actuator root web endpoint",
-            "operationId": "links_1",
+            "operationId": "links",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {
         "/actuator/loggers/{name}": {
             "post": {
                 "summary": "Actuator web endpoint 'loggers-name'",
-                "operationId": "loggers-name_3",
+                "operationId": "loggers-name",
                 "responses": {"200": {
                     "description": "OK",
                     "content": {"*/*": {"schema": {"type": "object"}}}
             },
             "get": {
                 "summary": "Actuator web endpoint 'loggers-name'",
-                "operationId": "loggers-name_4",
+                "operationId": "loggers-name_2",
                 "responses": {"200": {
                     "description": "OK",
                     "content": {"*/*": {"schema": {"type": "object"}}}
         }},
         "/actuator/metrics": {"get": {
             "summary": "Actuator web endpoint 'metrics'",
-            "operationId": "metrics_2",
+            "operationId": "metrics",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
         },
         "/actuator/info": {"get": {
             "summary": "Actuator web endpoint 'info'",
-            "operationId": "info_2",
+            "operationId": "info",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
         }},
         "/actuator/logfile": {"get": {
             "summary": "Actuator web endpoint 'logfile'",
-            "operationId": "logfile_2",
+            "operationId": "logfile",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
         }},
         "/actuator/health": {"get": {
             "summary": "Actuator web endpoint 'health'",
-            "operationId": "health_2",
+            "operationId": "health",
             "responses": {"200": {
                 "description": "OK",
                 "content": {"*/*": {"schema": {"type": "object"}}}
             }],
             "tags": ["Service Registry and Supervision"]
         }},
+        "/actuator/heapdump": {"get": {
+            "summary": "Actuator web endpoint 'heapdump'",
+            "operationId": "heapdump",
+            "responses": {"200": {
+                "description": "OK",
+                "content": {"*/*": {"schema": {"type": "object"}}}
+            }},
+            "tags": ["Actuator"]
+        }},
         "/a1-policy/v2/policies/{policy_id}/status": {"get": {
             "summary": "Returns a policy status",
             "operationId": "getPolicyStatus",
                 "required": true
             }],
             "tags": ["A1 Policy Management"]
-        }},
-        "/actuator/heapdump": {"get": {
-            "summary": "Actuator web endpoint 'heapdump'",
-            "operationId": "heapdump_2",
-            "responses": {"200": {
-                "description": "OK",
-                "content": {"*/*": {"schema": {"type": "object"}}}
-            }},
-            "tags": ["Actuator"]
         }}
     },
     "info": {
         {"name": "NearRT-RIC Repository"},
         {"name": "Callbacks"},
         {"name": "Health Check"},
-        {"name": "Management of configuration"},
         {
             "name": "Actuator",
             "description": "Monitor and interact",
                 "description": "Spring Boot Actuator Web API Documentation",
                 "url": "https://docs.spring.io/spring-boot/docs/current/actuator-api/html/"
             }
-        }
+        },
+        {"name": "Management of configuration"}
     ]
 }
\ No newline at end of file
index 875e273..958ec0d 100644 (file)
@@ -32,12 +32,12 @@ tags:
 - name: NearRT-RIC Repository
 - name: Callbacks
 - name: Health Check
-- name: Management of configuration
 - name: Actuator
   description: Monitor and interact
   externalDocs:
     description: Spring Boot Actuator Web API Documentation
     url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
+- name: Management of configuration
 paths:
   /a1-policy/v2/policy-instances:
     get:
@@ -95,6 +95,19 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/threaddump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'threaddump'
+      operationId: threaddump_2
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/status:
     get:
       tags:
@@ -108,12 +121,25 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/status_info_v2'
-  /actuator/threaddump:
+  /actuator/loggers:
     get:
       tags:
       - Actuator
-      summary: Actuator web endpoint 'threaddump'
-      operationId: threaddump_4
+      summary: Actuator web endpoint 'loggers'
+      operationId: loggers
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
+  /actuator/health/**:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'health-path'
+      operationId: health-path
       responses:
         200:
           description: OK
@@ -161,32 +187,6 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
-  /actuator/loggers:
-    get:
-      tags:
-      - Actuator
-      summary: Actuator web endpoint 'loggers'
-      operationId: loggers_2
-      responses:
-        200:
-          description: OK
-          content:
-            '*/*':
-              schema:
-                type: object
-  /actuator/health/**:
-    get:
-      tags:
-      - Actuator
-      summary: Actuator web endpoint 'health-path'
-      operationId: health-path_2
-      responses:
-        200:
-          description: OK
-          content:
-            '*/*':
-              schema:
-                type: object
   /a1-policy/v2/policy-types:
     get:
       tags:
@@ -305,7 +305,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'metrics-requiredMetricName'
-      operationId: metrics-requiredMetricName_2
+      operationId: metrics-requiredMetricName
       parameters:
       - name: requiredMetricName
         in: path
@@ -376,7 +376,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator root web endpoint
-      operationId: links_1
+      operationId: links
       responses:
         200:
           description: OK
@@ -393,7 +393,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'loggers-name'
-      operationId: loggers-name_4
+      operationId: loggers-name_2
       parameters:
       - name: name
         in: path
@@ -413,7 +413,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'loggers-name'
-      operationId: loggers-name_3
+      operationId: loggers-name
       parameters:
       - name: name
         in: path
@@ -464,7 +464,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'metrics'
-      operationId: metrics_2
+      operationId: metrics
       responses:
         200:
           description: OK
@@ -571,7 +571,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'info'
-      operationId: info_2
+      operationId: info
       responses:
         200:
           description: OK
@@ -624,7 +624,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'logfile'
-      operationId: logfile_2
+      operationId: logfile
       responses:
         200:
           description: OK
@@ -637,7 +637,7 @@ paths:
       tags:
       - Actuator
       summary: Actuator web endpoint 'health'
-      operationId: health_2
+      operationId: health
       responses:
         200:
           description: OK
@@ -790,6 +790,19 @@ paths:
             '*/*':
               schema:
                 $ref: '#/components/schemas/error_information'
+  /actuator/heapdump:
+    get:
+      tags:
+      - Actuator
+      summary: Actuator web endpoint 'heapdump'
+      operationId: heapdump
+      responses:
+        200:
+          description: OK
+          content:
+            '*/*':
+              schema:
+                type: object
   /a1-policy/v2/policies/{policy_id}/status:
     get:
       tags:
@@ -817,19 +830,6 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/error_information'
-  /actuator/heapdump:
-    get:
-      tags:
-      - Actuator
-      summary: Actuator web endpoint 'heapdump'
-      operationId: heapdump_2
-      responses:
-        200:
-          description: OK
-          content:
-            '*/*':
-              schema:
-                type: object
 components:
   schemas:
     error_information:
index c2d2804..301b4ab 100644 (file)
@@ -35,9 +35,8 @@
         <java.version.source>11</java.version.source>
         <java.version.target>11</java.version.target>
         <springfox.version>3.0.0</springfox.version>
-        <!-- Do not change to version 3.0.0! Will break the generated json. -->
-        <immutable.version>2.8.8</immutable.version>
-        <json.version>20211205</json.version>
+        <immutable.version>2.9.0</immutable.version>
+        <json.version>20220320</json.version>
         <formatter-maven-plugin.version>2.13.0</formatter-maven-plugin.version>
         <spotless-maven-plugin.version>2.5.0</spotless-maven-plugin.version>
         <commons-io.version>2.11.0</commons-io.version>
@@ -53,7 +52,7 @@
         <dependency>
             <groupId>org.springdoc</groupId>
             <artifactId>springdoc-openapi-ui</artifactId>
-            <version>1.6.3</version>
+            <version>1.6.6</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
         <dependency>
             <groupId>com.github.erosb</groupId>
             <artifactId>everit-json-schema</artifactId>
-            <version>1.13.0</version>
+            <version>1.14.0</version>
         </dependency>
     </dependencies>
     <build>
index 6d56c67..b262af0 100644 (file)
@@ -23,7 +23,6 @@ package org.onap.ccsdk.oran.a1policymanagementservice;
 import io.swagger.v3.oas.annotations.OpenAPIDefinition;
 import io.swagger.v3.oas.annotations.info.Info;
 import io.swagger.v3.oas.annotations.info.License;
-import io.swagger.v3.oas.annotations.tags.Tag;
 
 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.ConfigurationController;
 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.Consts;
@@ -40,33 +39,6 @@ import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.StatusContro
  *
  */
 @OpenAPIDefinition( //
-        tags = { //
-                @Tag(//
-                        name = ConfigurationController.API_NAME, //
-                        description = ConfigurationController.API_DESCRIPTION //
-                ), //
-                @Tag(//
-                        name = PolicyController.API_NAME, //
-                        description = PolicyController.API_DESCRIPTION //
-                ), //
-                @Tag( //
-                        name = RicRepositoryController.API_NAME, //
-                        description = RicRepositoryController.API_DESCRIPTION //
-                ), //
-                @Tag( //
-                        name = ServiceController.API_NAME, //
-                        description = ServiceController.API_DESCRIPTION //
-
-                ), //
-                @Tag( //
-                        name = StatusController.API_NAME, //
-                        description = StatusController.API_DESCRIPTION //
-                ), //
-                @Tag( //
-                        name = Consts.V2_API_SERVICE_CALLBACKS_NAME, //
-                        description = Consts.V2_API_SERVICE_CALLBACKS_DESCRIPTION //
-                ) //
-        }, //
         info = @Info(title = SwaggerConfig.API_TITLE, //
                 version = SwaggerConfig.VERSION, //
                 description = SwaggerConfig.DESCRIPTION, //
index 7a65bac..c8d9e4c 100644 (file)
@@ -49,7 +49,10 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController("ConfigurationControllerV2")
-@Tag(name = ConfigurationController.API_NAME)
+@Tag( //
+        name = ConfigurationController.API_NAME, //
+        description = ConfigurationController.API_DESCRIPTION //
+)
 public class ConfigurationController {
     private static final Logger logger = LoggerFactory.getLogger(ConfigurationController.class);
 
index 125b75a..6201842 100644 (file)
@@ -70,7 +70,10 @@ import org.springframework.web.reactive.function.client.WebClientResponseExcepti
 import reactor.core.publisher.Mono;
 
 @RestController("PolicyControllerV2")
-@Tag(name = PolicyController.API_NAME)
+@Tag(//
+        name = PolicyController.API_NAME, //
+        description = PolicyController.API_DESCRIPTION //
+)
 public class PolicyController {
 
     public static final String API_NAME = "A1 Policy Management";
index a531a73..def388a 100644 (file)
@@ -48,7 +48,10 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController("RicRepositoryControllerV2")
-@Tag(name = RicRepositoryController.API_NAME)
+@Tag( //
+        name = RicRepositoryController.API_NAME, //
+        description = RicRepositoryController.API_DESCRIPTION //
+)
 public class RicRepositoryController {
 
     public static final String API_NAME = "NearRT-RIC Repository";
@@ -70,7 +73,7 @@ public class RicRepositoryController {
 
     /**
      * Example: http://localhost:8081/v2/rics/ric?managed_element_id=kista_1
-     * 
+     *
      * @throws EntityNotFoundException
      */
     @GetMapping(path = Consts.V2_API_ROOT + "/rics/ric", produces = MediaType.APPLICATION_JSON_VALUE)
index 375f92f..7f34215 100644 (file)
@@ -56,7 +56,11 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController("ServiceControllerV2")
-@Tag(name = ServiceController.API_NAME)
+@Tag( //
+        name = ServiceController.API_NAME, //
+        description = ServiceController.API_DESCRIPTION //
+
+)
 public class ServiceController {
 
     public static final String API_NAME = "Service Registry and Supervision";
index cbdde96..df9dfd1 100644 (file)
@@ -36,7 +36,10 @@ import org.springframework.web.bind.annotation.RestController;
 import reactor.core.publisher.Mono;
 
 @RestController("StatusControllerV2")
-@Tag(name = StatusController.API_NAME)
+@Tag( //
+        name = StatusController.API_NAME, //
+        description = StatusController.API_DESCRIPTION //
+)
 public class StatusController {
 
     public static final String API_NAME = "Health Check";
index e599834..1fa5124 100644 (file)
@@ -47,7 +47,10 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController("RappCallbacksController")
-@Tag(name = Consts.V2_API_SERVICE_CALLBACKS_NAME)
+@Tag( //
+        name = Consts.V2_API_SERVICE_CALLBACKS_NAME, //
+        description = Consts.V2_API_SERVICE_CALLBACKS_DESCRIPTION //
+)
 public class RappSimulatorController {
 
     private final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());