[cps] Fix getResourceDataForPassthroughOperational endpoint
[cps.git] / docs / api / swagger / ncmp / openapi.yaml
index b7a6563..a43190b 100644 (file)
@@ -41,16 +41,6 @@ paths:
           sample 3:
             value:
               resourceIdentifier: "parent=shops,child=bookstore"
-      - name: Accept
-        in: header
-        description: "Accept parameter for response, if accept parameter is null,\
-          \ that means client can accept any format."
-        required: false
-        schema:
-          type: string
-          enum:
-          - application/json
-          - application/yang-data+json
       - name: options
         in: query
         description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
@@ -70,6 +60,17 @@ paths:
           sample 3:
             value:
               options: "(depth=2,fields=book/authors)"
+      - name: topic
+        in: query
+        description: topic parameter in query.
+        required: false
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              topic: my-topic-name
       responses:
         "200":
           description: OK
@@ -120,6 +121,18 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
+
   /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running:
     get:
       tags:
@@ -155,16 +168,6 @@ paths:
           sample 3:
             value:
               resourceIdentifier: "parent=shops,child=bookstore"
-      - name: Accept
-        in: header
-        description: "Accept parameter for response, if accept parameter is null,\
-          \ that means client can accept any format."
-        required: false
-        schema:
-          type: string
-          enum:
-          - application/json
-          - application/yang-data+json
       - name: options
         in: query
         description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
@@ -184,6 +187,17 @@ paths:
           sample 3:
             value:
               options: "(depth=2,fields=book/authors)"
+      - name: topic
+        in: query
+        description: topic parameter in query.
+        required: false
+        allowReserved: true
+        schema:
+          type: string
+        examples:
+          sample 1:
+            value:
+              topic: my-topic-name
       responses:
         "200":
           description: OK
@@ -234,6 +248,17 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     put:
       tags:
       - network-cm-proxy
@@ -340,6 +365,17 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     post:
       tags:
       - network-cm-proxy
@@ -442,6 +478,17 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     delete:
       tags:
       - network-cm-proxy
@@ -539,6 +586,17 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
     patch:
       tags:
       - network-cm-proxy
@@ -639,6 +697,17 @@ paths:
                 status: 500
                 message: Internal Server Error
                 details: Internal Server Error occurred
+        "502":
+          description: Bad Gateway
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DmiErrorMessage'
+              example:
+                message: "Bad Gateway Error Message NCMP"
+                dmi-response:
+                  http-code: 400
+                  body: Bad Request
   /v1/ch/{cm-handle}/modules:
     get:
       tags:
@@ -664,7 +733,7 @@ paths:
               schema:
                 type: array
                 items:
-                  $ref: '#/components/schemas/ModuleReference'
+                  $ref: '#/components/schemas/RestModuleReference'
         "400":
           description: Bad Request
           content:
@@ -851,7 +920,24 @@ components:
           type: string
         details:
           type: string
-    ModuleReference:
+    # DMI Server Exception Schema
+    DmiErrorMessage:
+      title: DMI Error Message
+      type: object
+      properties:
+        message:
+          type: string
+          example: "Bad Gateway Error Message NCMP"
+        dmi-response:
+          type: object
+          properties:
+            http-code:
+              type: integer
+              example: 400
+            body:
+              type: string
+              example: Bad Request
+    RestModuleReference:
       title: Module reference details
       type: object
       properties: