[BUG] Fix for Swagger UI generation 58/136158/4
authoregernug <gerard.nugent@est.tech>
Thu, 12 Oct 2023 12:33:08 +0000 (13:33 +0100)
committeregernug <gerard.nugent@est.tech>
Tue, 17 Oct 2023 11:12:36 +0000 (12:12 +0100)
Issue-ID: CPS-1913

Signed-off-by: egernug <gerard.nugent@est.tech>
Change-Id: Ib8a1b5fddc9957bd371fbb4dc54d018b25af3679

cps-application/pom.xml
cps-dependencies/pom.xml
cps-ncmp-rest/pom.xml
cps-rest/docs/openapi/components.yml
docs/api/swagger/cps/openapi.yaml
docs/api/swagger/ncmp/openapi-inventory.yaml

index f4e3e91..7b0f1f6 100755 (executable)
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springdoc</groupId>
+            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-server</artifactId>
index cff596f..a59dbe4 100755 (executable)
     <dependencyManagement>
         <dependencies>
             <!-- S P R I N G   D E P E N D E N C I E S -->
+            <dependency>
+                <groupId>org.springdoc</groupId>
+                <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
+                <version>2.0.2</version>
+            </dependency>
             <dependency>
                 <groupId>org.springdoc</groupId>
                 <artifactId>springdoc-openapi-ui</artifactId>
index 6a52d9f..d401d90 100644 (file)
                         <phase>compile</phase>
                         <configuration>
                             <inputSpec>${project.basedir}/docs/openapi/openapi-inventory.yml</inputSpec>
-                            <generatorName>spring</generatorName>
+                            <generatorName>openapi-yaml</generatorName>
                             <configOptions>
                                 <outputFile>openapi-inventory.yaml</outputFile>
-                                <useSpringBoot3>true</useSpringBoot3>
                             </configOptions>
                         </configuration>
                     </execution>
index 900f663..a3016ce 100644 (file)
@@ -1,6 +1,6 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021-2022 Bell Canada.
-# Modifications Copyright (C) 2021-2022 Nordix Foundation
+# Modifications Copyright (C) 2021-2023 Nordix Foundation
 # Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
 # Modifications Copyright (C) 2022 Deutsche Telekom AG
 # ================================================================================
@@ -64,7 +64,6 @@ components:
           type: string
           description: multipartFile
           format: binary
-          example:  'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
 
     ModuleReferences:
       type: object
index 453494e..30ca1fd 100644 (file)
@@ -2732,9 +2732,6 @@ components:
       properties:
         file:
           description: multipartFile
-          example: !!binary |-
-            aHR0cHM6Ly9naXRodWIuY29tL29uYXAvY3BzL2Jsb2IvbWFzdGVyL2Nwcy1zZXJ2aWNlL3NyYy90
-            ZXN0L3Jlc291cmNlcy9ib29rc3RvcmUueWFuZw==
           format: binary
           type: string
       required:
index af6b004..ebe3101 100644 (file)
@@ -287,6 +287,12 @@ components:
           moduleSetTag: my-module-set-tag
         dmiPlugin: my-dmi-plugin
         dmiModelPlugin: my-dmi-model-plugin
+        upgradedCmHandles:
+          cmHandles:
+          - my-cm-handle1
+          - my-cm-handle2
+          - my-cm-handle3
+          moduleSetTag: my-module-set-tag
         dmiDataPlugin: my-dmi-data-plugin
         removedCmHandles:
         - my-cm-handle1
@@ -321,6 +327,8 @@ components:
           items:
             type: string
           type: array
+        upgradedCmHandles:
+          $ref: '#/components/schemas/UpgradedCmHandles'
       type: object
     RestInputCmHandle:
       example:
@@ -355,6 +363,28 @@ components:
         example: my-property
         type: string
       type: object
+    UpgradedCmHandles:
+      example:
+        cmHandles:
+        - my-cm-handle1
+        - my-cm-handle2
+        - my-cm-handle3
+        moduleSetTag: my-module-set-tag
+      properties:
+        cmHandles:
+          example:
+          - my-cm-handle1
+          - my-cm-handle2
+          - my-cm-handle3
+          items:
+            type: string
+          type: array
+        moduleSetTag:
+          example: my-module-set-tag
+          type: string
+      required:
+      - cmHandles
+      type: object
     ErrorMessage:
       properties:
         status:
@@ -379,6 +409,10 @@ components:
           items:
             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
           type: array
+        failedUpgradeCmHandles:
+          items:
+            $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
+          type: array
       type: object
     CmHandlerRegistrationErrorResponse:
       properties: