Add 'direct' keyword to descendants option to query direct children (ep1)
[cps.git] / cps-rest / docs / openapi / components.yml
index e700da6..a721305 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021-2022 Bell Canada.
 # Modifications Copyright (C) 2021-2022 Nordix Foundation
-# Modifications Copyright (C) 2022 TechMahindra Ltd.
+# Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
 # Modifications Copyright (C) 2022 Deutsche Telekom AG
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -118,6 +118,26 @@ components:
               </categories>
             </bookstore>
           </stores>
+    dataSampleAcrossAnchors:
+      value:
+        - 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
 
   parameters:
     dataspaceNameInQuery:
@@ -171,7 +191,7 @@ components:
     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
@@ -184,7 +204,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
@@ -240,6 +260,15 @@ components:
         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
 
   responses:
     NotFound: