Add HTTP 409 Conflict error response to NCMP OpenAPI Doc 91/140691/2
authorToineSiebelink <toine.siebelink@est.tech>
Mon, 14 Apr 2025 12:50:50 +0000 (13:50 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Mon, 14 Apr 2025 13:51:45 +0000 (14:51 +0100)
- This error can occur when Policy Execution denies write operation but was never documented

Issue-ID: CPS-2764
Change-Id: Idc47371b63b1348f86384e1ff3a8ae0d50056cdf
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
cps-ncmp-rest/docs/openapi/ncmp.yml
docs/api/swagger/cps/openapi.yaml
docs/api/swagger/ncmp/openapi.yaml

index 15b8b37..6dd9113 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2021-2024 Nordix Foundation
+#  Copyright (C) 2021-2024 OpenInfra Foundation Europe. All rights reserved.
 #  Modifications Copyright (C) 2021 Pantheon.tech
 #  Modifications Copyright (C) 2021-2022 Bell Canada
 #  ================================================================================
@@ -86,6 +86,8 @@ resourceDataForCmHandle:
         $ref: 'components.yaml#/components/responses/BadRequest'
       403:
         $ref: 'components.yaml#/components/responses/Forbidden'
+      409:
+        $ref: 'components.yaml#/components/responses/Conflict'
       500:
         $ref: 'components.yaml#/components/responses/InternalServerError'
       502:
@@ -125,6 +127,8 @@ resourceDataForCmHandle:
         $ref: 'components.yaml#/components/responses/BadRequest'
       403:
         $ref: 'components.yaml#/components/responses/Forbidden'
+      409:
+        $ref: 'components.yaml#/components/responses/Conflict'
       500:
         $ref: 'components.yaml#/components/responses/InternalServerError'
       502:
@@ -158,6 +162,8 @@ resourceDataForCmHandle:
         $ref: 'components.yaml#/components/responses/BadRequest'
       403:
         $ref: 'components.yaml#/components/responses/Forbidden'
+      409:
+        $ref: 'components.yaml#/components/responses/Conflict'
       500:
         $ref: 'components.yaml#/components/responses/InternalServerError'
       502:
@@ -184,6 +190,8 @@ resourceDataForCmHandle:
         $ref: 'components.yaml#/components/responses/Forbidden'
       404:
         $ref: 'components.yaml#/components/responses/NotFound'
+      409:
+        $ref: 'components.yaml#/components/responses/Conflict'
       500:
         $ref: 'components.yaml#/components/responses/InternalServerError'
       502:
index 1545487..0f3564b 100644 (file)
@@ -19,6 +19,8 @@ tags:
   name: cps-admin
 - description: cps Data
   name: cps-data
+- description: CPS Delta
+  name: cps-delta
 paths:
   /v1/dataspaces:
     post:
@@ -2185,7 +2187,7 @@ paths:
           description: Internal Server Error
       summary: Get delta between anchors in the same dataspace
       tags:
-      - cps-data
+      - cps-delta
       x-codegen-request-body-name: xpath
     post:
       description: Get delta between an anchor in a dataspace and JSON payload
@@ -2275,7 +2277,7 @@ paths:
           description: Internal Server Error
       summary: Get delta between an anchor and JSON payload
       tags:
-      - cps-data
+      - cps-delta
   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
     get:
       deprecated: true
index ec9b4fb..2c79f6f 100644 (file)
@@ -32,11 +32,11 @@ paths:
       - description: |
           The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
              For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-               - All GNBDUFunctions: `'/ManagedElement=NRNode1/GNBDUFunction=1'`
+               - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
         examples:
           sample 1:
             value:
-              resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+              resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
         in: query
         name: resourceIdentifier
         required: true
@@ -91,6 +91,16 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: The specified resource was not found
+        "409":
+          content:
+            application/json:
+              example:
+                status: 409
+                message: Conflict error message
+                details: Conflict error details
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Conflict
         "500":
           content:
             application/json:
@@ -138,11 +148,11 @@ paths:
       - description: |
           The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
              For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-               - All GNBDUFunctions: `/ManagedElement=NRNode1/GNBDUFunction=1`
+               - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
         examples:
           sample 1:
             value:
-              resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+              resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
         in: query
         name: resourceIdentifier
         required: true
@@ -152,18 +162,18 @@ paths:
           The `options` parameter specifies additional query options. It is mandatory to wrap key(s)=value(s) in parentheses `()`.
           Examples for GNBDUFunctionConfig queries:
             - Limit depth of returned sub-tree: `(depth=2)`
-            - Select specific fields: `(fields=id,gNBDUName)`
-            - Combine options: `(depth=3,fields=id,gNBDUName)`
+            - Select specific fields: `(fields=attributes(gNBId;gNBDUName))`
+            - Combine options: `(depth=3,fields=attributes(gNBId;gNBDUName))`
         examples:
           Limit Depth:
             value:
               options: (depth=2)
           Select Specific Fields:
             value:
-              options: "(fields=id,gNBDUName)"
+              options: (fields=attributes(gNBId;gNBDUName))
           Combine Depth and Fields:
             value:
-              options: "(depth=3,fields=id,gNBDUName)"
+              options: "(depth=3,fields=attributes(gNBId;gNBDUName))"
         in: query
         name: options
         required: false
@@ -271,11 +281,11 @@ paths:
       - description: |
           The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
              For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-               - All GNBDUFunctions: `/ManagedElement=NRNode1/GNBDUFunction=1`
+               - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
         examples:
           sample 1:
             value:
-              resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+              resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
         in: query
         name: resourceIdentifier
         required: true
@@ -333,6 +343,16 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Forbidden
+        "409":
+          content:
+            application/json:
+              example:
+                status: 409
+                message: Conflict error message
+                details: Conflict error details
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Conflict
         "500":
           content:
             application/json:
@@ -380,11 +400,11 @@ paths:
       - description: |
           The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
              For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-               - All GNBDUFunctions: `/ManagedElement=NRNode1/GNBDUFunction=1`
+               - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
         examples:
           sample 1:
             value:
-              resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+              resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
         in: query
         name: resourceIdentifier
         required: true
@@ -446,6 +466,16 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Forbidden
+        "409":
+          content:
+            application/json:
+              example:
+                status: 409
+                message: Conflict error message
+                details: Conflict error details
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Conflict
         "500":
           content:
             application/json:
@@ -494,11 +524,11 @@ paths:
       - description: |
           The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
              For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-               - All GNBDUFunctions: `/ManagedElement=NRNode1/GNBDUFunction=1`
+               - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
         examples:
           sample 1:
             value:
-              resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+              resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
         in: query
         name: resourceIdentifier
         required: true
@@ -563,6 +593,16 @@ paths:
               schema:
                 $ref: '#/components/schemas/ErrorMessage'
           description: Forbidden
+        "409":
+          content:
+            application/json:
+              example:
+                status: 409
+                message: Conflict error message
+                details: Conflict error details
+              schema:
+                $ref: '#/components/schemas/ErrorMessage'
+          description: Conflict
         "500":
           content:
             application/json:
@@ -699,10 +739,10 @@ paths:
         schema:
           example: my-cm-handle
           type: string
-      - description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
+      - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
         examples:
           container cps path:
-            value: '/GNBDUFunction'
+            value: //GNBDUFunction
           list attributes cps path:
             value: "//GNBDUFunction[@id='1001']"
         in: query
@@ -723,7 +763,7 @@ paths:
               options: (depth=2)
           Select Specific Fields:
             value:
-              options: "(fields=attributes(gNBId;gNBDUName))"
+              options: (fields=attributes(gNBId;gNBDUName))
           Combine Depth and Fields:
             value:
               options: "(depth=3,fields=attributes(gNBId;gNBDUName))"
@@ -1478,11 +1518,11 @@ components:
       description: |
         The `resourceIdentifier` parameter specifies the target resource in the GNBDUFunctionConfig model.
            For ONAP DMI Plugin, the format will follow RESTConf paths. Examples:
-             - All GNBDUFunctions: `/ManagedElement=NRNode1/GNBDUFunction=1`
+             - All GNBDUFunctions: `/ManagedElement=node1/GNBDUFunction=1`
       examples:
         sample 1:
           value:
-            resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+            resourceIdentifier: /ManagedElement=node1/GNBDUFunction=1
       in: query
       name: resourceIdentifier
       required: true
@@ -1501,7 +1541,7 @@ components:
             options: (depth=2)
         Select Specific Fields:
           value:
-            options: "(fields=attributes(gNBId;gNBDUName))"
+            options: (fields=attributes(gNBId;gNBDUName))
         Combine Depth and Fields:
           value:
             options: "(depth=3,fields=attributes(gNBId;gNBDUName))"
@@ -1567,21 +1607,12 @@ components:
         example: my-cm-handle
         type: string
     cpsPathInQuery:
-      description: |
-        The `cps-path` parameter allows referencing elements in the GNBDUFunctionConfig data model.
-            For more details on cps path, please refer to:
-            [CPS Path Documentation](https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html).
-            Example paths:
-              - Root GNBDUFunction: `/GNBDUFunction`
-              - Specific gNB ID: `//GNBDUFunction[@id='1001']`
-              - RIM-RS Reporting Config: `//GNBDUFunction[@id='1001']/rimRSReportConf`
+      description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
       examples:
-        GNBDUFunction Root:
-          value: /GNBDUFunction
-        Specific gNB ID:
+        container cps path:
+          value: //GNBDUFunction
+        list attributes cps path:
           value: "//GNBDUFunction[@id='1001']"
-        RIM-RS Reporting Config:
-          value: "//GNBDUFunction[@id='1001']/rimRSReportConf"
       in: query
       name: cps-path
       required: false
@@ -1670,6 +1701,16 @@ components:
           schema:
             type: object
       description: OK
+    Conflict:
+      content:
+        application/json:
+          example:
+            status: 409
+            message: Conflict error message
+            details: Conflict error details
+          schema:
+            $ref: '#/components/schemas/ErrorMessage'
+      description: Conflict
     Created:
       content: {}
       description: Created
@@ -1719,7 +1760,7 @@ components:
     DataOperationRequest:
       example:
         operations:
-        - resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+        - resourceIdentifier: /ManagedElement=NRNode1/GNBDUFunction=1
           targetIds:
           - "[\"da310eecdb8d44c2acc0ddaae01174b1\",\"c748c58f8e0b438f9fd1f28370b17d47\"\
             ]"
@@ -1729,7 +1770,7 @@ components:
           options: (fields=NRCellDU/attributes/cellLocalId)
           operationId: "12"
           operation: read
-        - resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+        - resourceIdentifier: /ManagedElement=NRNode1/GNBDUFunction=1
           targetIds:
           - "[\"da310eecdb8d44c2acc0ddaae01174b1\",\"c748c58f8e0b438f9fd1f28370b17d47\"\
             ]"
@@ -1749,7 +1790,7 @@ components:
       type: object
     DataOperationDefinition:
       example:
-        resourceIdentifier: '/ManagedElement=NRNode1/GNBDUFunction=1'
+        resourceIdentifier: /ManagedElement=NRNode1/GNBDUFunction=1
         targetIds:
         - "[\"da310eecdb8d44c2acc0ddaae01174b1\",\"c748c58f8e0b438f9fd1f28370b17d47\"\
           ]"
@@ -1773,7 +1814,7 @@ components:
           example: (fields=NRCellDU/attributes/cellLocalId)
           type: string
         resourceIdentifier:
-          example: '/ManagedElement=NRNode1/GNBDUFunction=1'
+          example: /ManagedElement=NRNode1/GNBDUFunction=1
           type: string
         targetIds:
           items: