shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (c) 2021 Bell Canada. |
| 3 | # ================================================================================ |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # ============LICENSE_END========================================================= |
| 16 | |
Rishi.Chail | dacc663 | 2021-01-27 04:27:34 +0000 | [diff] [blame] | 17 | nodeByDataspaceAndAnchor: |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 18 | get: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 19 | description: Get a node with an option to retrieve all the children for a given anchor and dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 20 | tags: |
| 21 | - cps-data |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 22 | summary: Get a node |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 23 | operationId: getNodeByDataspaceAndAnchor |
| 24 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 25 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 26 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 27 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 28 | - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 29 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 30 | '200': |
JosephKeenan | 2472e61 | 2021-06-23 14:15:52 +0100 | [diff] [blame] | 31 | description: OK |
| 32 | content: |
| 33 | application/json: |
| 34 | schema: |
| 35 | type: object |
| 36 | example: { "child": my_child,"leafList": "leafListElement1, leafListElement2", "leaf": my_leaf } |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 37 | '400': |
| 38 | $ref: 'components.yml#/components/responses/BadRequest' |
| 39 | '401': |
| 40 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 41 | '403': |
| 42 | $ref: 'components.yml#/components/responses/Forbidden' |
| 43 | '404': |
| 44 | $ref: 'components.yml#/components/responses/NotFound' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 45 | x-codegen-request-body-name: xpath |
| 46 | |
Ruslan Kashapov | 0905ac1 | 2021-05-05 13:11:50 +0300 | [diff] [blame] | 47 | listNodeByDataspaceAndAnchor: |
| 48 | post: |
| 49 | description: Add list-node child elements to existing node for a given anchor and dataspace |
| 50 | tags: |
| 51 | - cps-data |
| 52 | summary: Add list-node child element(s) under existing parent node |
| 53 | operationId: addListNodeElements |
| 54 | parameters: |
| 55 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 56 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 57 | - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' |
| 58 | requestBody: |
| 59 | required: true |
| 60 | content: |
| 61 | application/json: |
| 62 | schema: |
| 63 | type: string |
| 64 | responses: |
| 65 | '201': |
| 66 | $ref: 'components.yml#/components/responses/Created' |
| 67 | '400': |
| 68 | $ref: 'components.yml#/components/responses/BadRequest' |
| 69 | '401': |
| 70 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 71 | '403': |
| 72 | $ref: 'components.yml#/components/responses/Forbidden' |
| 73 | |
Ruslan Kashapov | 576f48e | 2021-05-14 14:41:05 +0300 | [diff] [blame] | 74 | patch: |
| 75 | description: Replace list-node child elements under existing node for a given anchor and dataspace |
| 76 | tags: |
| 77 | - cps-data |
| 78 | summary: Replace list-node child element(s) under existing parent node |
| 79 | operationId: replaceListNodeElements |
| 80 | parameters: |
| 81 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 82 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 83 | - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' |
| 84 | requestBody: |
| 85 | required: true |
| 86 | content: |
| 87 | application/json: |
| 88 | schema: |
| 89 | type: string |
| 90 | responses: |
| 91 | '200': |
| 92 | $ref: 'components.yml#/components/responses/Created' |
| 93 | '400': |
| 94 | $ref: 'components.yml#/components/responses/BadRequest' |
| 95 | '401': |
| 96 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 97 | '403': |
| 98 | $ref: 'components.yml#/components/responses/Forbidden' |
| 99 | |
Rishi.Chail | dacc663 | 2021-01-27 04:27:34 +0000 | [diff] [blame] | 100 | nodesByDataspaceAndAnchor: |
niamhcore | 74753d9 | 2021-01-28 16:11:52 +0000 | [diff] [blame] | 101 | post: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 102 | description: Create a node for a given anchor and dataspace |
niamhcore | 74753d9 | 2021-01-28 16:11:52 +0000 | [diff] [blame] | 103 | tags: |
| 104 | - cps-data |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 105 | summary: Create a node |
niamhcore | 74753d9 | 2021-01-28 16:11:52 +0000 | [diff] [blame] | 106 | operationId: createNode |
| 107 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 108 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 109 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
Ruslan Kashapov | 24bf350 | 2021-04-19 12:40:01 +0300 | [diff] [blame] | 110 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
niamhcore | 74753d9 | 2021-01-28 16:11:52 +0000 | [diff] [blame] | 111 | requestBody: |
| 112 | required: true |
| 113 | content: |
| 114 | application/json: |
| 115 | schema: |
| 116 | type: string |
| 117 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 118 | '201': |
| 119 | $ref: 'components.yml#/components/responses/Created' |
| 120 | '400': |
| 121 | $ref: 'components.yml#/components/responses/BadRequest' |
| 122 | '401': |
| 123 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 124 | '403': |
| 125 | $ref: 'components.yml#/components/responses/Forbidden' |
niamhcore | 74753d9 | 2021-01-28 16:11:52 +0000 | [diff] [blame] | 126 | |
Ruslan Kashapov | 24c72db | 2021-02-09 17:25:18 +0200 | [diff] [blame] | 127 | patch: |
| 128 | description: Update a data node leaves for a given dataspace and anchor and a parent node xpath |
| 129 | tags: |
| 130 | - cps-data |
| 131 | summary: Update node leaves |
| 132 | operationId: updateNodeLeaves |
| 133 | parameters: |
| 134 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 135 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 136 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 137 | requestBody: |
| 138 | required: true |
| 139 | content: |
| 140 | application/json: |
| 141 | schema: |
| 142 | type: string |
| 143 | responses: |
| 144 | '200': |
| 145 | $ref: 'components.yml#/components/responses/Ok' |
| 146 | '400': |
| 147 | $ref: 'components.yml#/components/responses/BadRequest' |
| 148 | '401': |
| 149 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 150 | '403': |
| 151 | $ref: 'components.yml#/components/responses/Forbidden' |
| 152 | |
| 153 | put: |
| 154 | description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath |
| 155 | tags: |
| 156 | - cps-data |
| 157 | summary: Replace a node with descendants |
| 158 | operationId: replaceNode |
| 159 | parameters: |
| 160 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 161 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 162 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 163 | requestBody: |
| 164 | required: true |
| 165 | content: |
| 166 | application/json: |
| 167 | schema: |
| 168 | type: string |
| 169 | responses: |
| 170 | '200': |
| 171 | $ref: 'components.yml#/components/responses/Ok' |
| 172 | '400': |
| 173 | $ref: 'components.yml#/components/responses/BadRequest' |
| 174 | '401': |
| 175 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 176 | '403': |
| 177 | $ref: 'components.yml#/components/responses/Forbidden' |
| 178 | |
| 179 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 180 | nodesByDataspace: |
| 181 | get: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 182 | description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 183 | tags: |
| 184 | - cps-data |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 185 | summary: Get nodes |
| 186 | operationId: getNodesByDataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 187 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 188 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 189 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 190 | '200': |
| 191 | $ref: 'components.yml#/components/responses/Ok' |
| 192 | '400': |
| 193 | $ref: 'components.yml#/components/responses/BadRequest' |
| 194 | '401': |
| 195 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 196 | '403': |
| 197 | $ref: 'components.yml#/components/responses/Forbidden' |
| 198 | '404': |
| 199 | $ref: 'components.yml#/components/responses/NotFound' |
| 200 | x-codegen-request-body-name: requestBody |