Chsnge to OpenApi 3.0
[cps.git] / cps-ncmp-rest / docs / openapi / components.yaml
index b4b8c84..818b2da 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2021-2022 Nordix Foundation
+#  Copyright (C) 2021-2023 Nordix Foundation
 #  Modifications Copyright (C) 2021 Pantheon.tech
 #  Modifications Copyright (C) 2022 Bell Canada
 #  ================================================================================
@@ -38,7 +38,7 @@ components:
       properties:
         message:
           type: string
-          example: "Bad Gateway Error Message NCMP"
+          example: 'Bad Gateway Error Message NCMP'
         dmi-response:
           type: object
           properties:
@@ -160,11 +160,11 @@ components:
           example: |
             module stores {
               yang-version 1.1;
-              namespace "org:onap:ccsdk:sample";
+              namespace 'org:onap:ccsdk:sample';
               prefix book-store;
-              revision "2020-09-15" {
+              revision '2020-09-15' {
                 description
-                "Sample Model";
+                'Sample Model';
               }
             }
 
@@ -175,13 +175,11 @@ components:
         cmHandleQueryParameters:
           type: array
           items:
-            type: object
             $ref: '#/components/schemas/ConditionProperties'
         conditions:
           deprecated: true
           type: array
           items:
-            type: object
             $ref: '#/components/schemas/OldConditionProperties'
           description: not necessary, it is just for backward compatibility
 
@@ -203,7 +201,6 @@ components:
         conditionParameters:
           type: array
           items:
-            type: object
             $ref: '#/components/schemas/ModuleNameAsJsonObject'
     ModuleNameAsJsonObject:
       properties:
@@ -285,6 +282,42 @@ components:
       properties:
         state:
           $ref: '#/components/schemas/CmHandleCompositeState'
+    # Data Operation Request Schemas
+    DataOperationRequest:
+      type: object
+      title: execute data operation for given array of operations
+      properties:
+        operations:
+          type: array
+          items:
+            $ref: '#/components/schemas/DataOperationDefinition'
+          description: contains group of data operation requests
+    DataOperationDefinition:
+      required:
+        - operation
+        - datastore
+        - operationId
+      properties:
+        operation:
+          type: string
+          example: 'read'
+        operationId:
+          type: string
+          example: '12'
+        datastore:
+          type: string
+          example: 'ncmp-datastore:passthrough-operational'
+        options:
+          type: string
+          example: '(fields=schemas/schema)'
+        resourceIdentifier:
+          type: string
+          example: 'parent/child'
+        targetIds:
+          type: array
+          items:
+            type: string
+            example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
 
   examples:
     dataSampleRequest:
@@ -522,6 +555,18 @@ components:
         sample 1:
           value:
             topic: my-topic-name
+    requiredTopicParamInQuery:
+      name: topic
+      in: query
+      description: mandatory topic parameter in query.
+      required: true
+      schema:
+        type: string
+      allowReserved: true
+      examples:
+        sample 1:
+          value:
+            topic: my-topic-name
     contentParamInHeader:
       name: Content-Type
       in: header
@@ -538,7 +583,7 @@ components:
       required: true
       schema:
         type: string
-        example: ncmp-datastore:operational
+        example: ncmp-datastore:running
 
   responses:
     NotFound: