Merge "Trust level updates with dmi status change"
[cps.git] / cps-rest / docs / openapi / components.yml
index 5f31569..c1b111b 100644 (file)
@@ -1,6 +1,8 @@
 # ============LICENSE_START=======================================================
-# Copyright (c) 2021 Bell Canada.
-# Modifications Copyright (C) 2021-2022 Nordix Foundation
+# Copyright (c) 2021-2022 Bell Canada.
+# Modifications Copyright (C) 2021-2023 Nordix Foundation
+# Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
+# Modifications Copyright (C) 2022 Deutsche Telekom AG
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,6 +36,14 @@ components:
           type: string
           example: my-schema-set
 
+    DataspaceDetails:
+      type: object
+      title: Dataspace details by dataspace Name
+      properties:
+        name:
+          type: string
+          example: my-dataspace
+
     ErrorMessage:
       type: object
       title: Error
@@ -54,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
@@ -73,6 +82,8 @@ components:
     SchemaSetDetails:
       type: object
       title: Schema set details by dataspace and schemasetName
+      required:
+        - "moduleReferences"
       properties:
         dataspaceName:
           type: string
@@ -86,7 +97,7 @@ components:
           example: my-schema-set
 
   examples:
-    dataSampleRequest:
+    dataSample:
       value:
         test:bookstore:
           bookstore-name: Chapters
@@ -95,16 +106,55 @@ components:
               name: SciFi
             - code: 02
               name: kids
-
-    dataSampleResponse:
-      summary: The data node returned does not include the root node. This is being investigated as a part of CPS-461
+    dataSampleXml:
+        value:
+          <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+            <bookstore xmlns="org:onap:ccsdk:sample">
+              <bookstore-name>Chapters</bookstore-name>
+              <categories>
+                <code>1</code>
+                <name>SciFi</name>
+              </categories>
+            </bookstore>
+          </stores>
+    dataSampleAcrossAnchors:
       value:
-          bookstore-name: Chapters
-          categories:
-            - code: 01
-              name: SciFi
-            - code: 02
-              name: kids
+        - anchorName: bookstore1
+          dataNode:
+            test:bookstore:
+              bookstore-name: Chapters
+              categories:
+                - code: 01
+                  name: SciFi
+                - code: 02
+                  name: kids
+        - anchorName: bookstore2
+          dataNode:
+            test:bookstore:
+              bookstore-name: Chapters
+              categories:
+                - code: 01
+                  name: SciFi
+                - code: 02
+                  name: kids
+    deltaReportSample:
+      value:
+        - action: "ADD"
+          xpath: "/bookstore/categories/[@code=3]"
+          target-data:
+            code: 3,
+            name: "kidz"
+        - action: "REMOVE"
+          xpath: "/bookstore/categories/[@code=1]"
+          source-data:
+            code: 1,
+            name: "Fiction"
+        - action: "UPDATE"
+          xpath: "/bookstore/categories/[@code=2]"
+          source-data:
+            name: "Funny"
+          target-data:
+            name: "Comic"
 
   parameters:
     dataspaceNameInQuery:
@@ -155,10 +205,18 @@ components:
       schema:
         type: string
         example: my-anchor
+    targetAnchorNameInQuery:
+      name: target-anchor-name
+      in: query
+      description: target-anchor-name
+      required: true
+      schema:
+        type: string
+        example: my-anchor
     xpathInQuery:
       name: xpath
       in: query
-      description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
+      description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
       required: false
       schema:
         type: string
@@ -171,7 +229,7 @@ components:
     requiredXpathInQuery:
       name: xpath
       in: query
-      description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
+      description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
       required: true
       schema:
         type: string
@@ -210,6 +268,48 @@ components:
       schema:
         type: string
         example: '2021-03-21T00:10:34.030-0100'
+    apiVersionInPath:
+      name: apiVersion
+      in: path
+      description: apiVersion
+      required: true
+      schema:
+        type: string
+        enum: [v1, v2]
+        default: v2
+    contentTypeHeader:
+      name: Content-Type
+      in: header
+      description: Content type header
+      schema:
+        type: string
+        example: 'application/json'
+      required: true
+    descendantsInQuery:
+      name: descendants
+      in: query
+      description: Number of descendants to query. Allowed values are 'none', 'all', 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive number.
+      required: false
+      schema:
+        type: string
+        default: none
+        example: 3
+    pageIndexInQuery:
+      name: pageIndex
+      in: query
+      description: page index for pagination over anchors. It must be greater then zero if provided.
+      required: false
+      schema:
+        type: integer
+        example: 1
+    pageSizeInQuery:
+      name: pageSize
+      in: query
+      description: number of records (anchors) per page. It must be greater then zero if provided.
+      required: false
+      schema:
+        type: integer
+        example: 10
 
   responses:
     NotFound:
@@ -269,7 +369,7 @@ components:
           schema:
             type: object
           examples:
-            dataSampleResponse:
+            dataSample:
               value: ""
     Created:
       description: Created
@@ -278,6 +378,8 @@ components:
           schema:
             type: string
             example: my-resource
+    CreatedV2:
+      description: Created without response body
     InternalServerError:
       description: Internal Server Error
       content: