shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
puthuparambil.aditya | cc17ae5 | 2022-02-25 13:24:03 +0000 | [diff] [blame] | 2 | # Copyright (c) 2021-2022 Bell Canada. |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 3 | # Modifications Copyright (C) 2021-2022 Nordix Foundation |
rajesh.kumar | cc21a02 | 2022-12-06 11:47:24 +0000 | [diff] [blame] | 4 | # Modifications Copyright (C) 2022-2023 TechMahindra Ltd. |
Michal Jagiello | 6ce84d9 | 2022-12-13 07:40:19 +0000 | [diff] [blame] | 5 | # Modifications Copyright (C) 2022 Deutsche Telekom AG |
shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 6 | # ================================================================================ |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 18 | # |
| 19 | # SPDX-License-Identifier: Apache-2.0 |
shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 20 | # ============LICENSE_END========================================================= |
| 21 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 22 | components: |
| 23 | schemas: |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 24 | |
| 25 | AnchorDetails: |
| 26 | type: object |
| 27 | title: Anchor details by anchor Name |
| 28 | properties: |
| 29 | name: |
| 30 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 31 | example: my-anchor |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 32 | dataspaceName: |
| 33 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 34 | example: my-dataspace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 35 | schemaSetName: |
| 36 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 37 | example: my-schema-set |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 38 | |
rajesh.kumar | cec0cb7 | 2022-09-06 11:47:18 +0000 | [diff] [blame] | 39 | DataspaceDetails: |
| 40 | type: object |
| 41 | title: Dataspace details by dataspace Name |
| 42 | properties: |
| 43 | name: |
| 44 | type: string |
| 45 | example: my-dataspace |
| 46 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 47 | ErrorMessage: |
| 48 | type: object |
| 49 | title: Error |
| 50 | properties: |
| 51 | status: |
| 52 | type: string |
| 53 | message: |
| 54 | type: string |
| 55 | details: |
| 56 | type: string |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 57 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 58 | MultipartFile: |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 59 | type: object |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 60 | required: |
| 61 | - file |
| 62 | properties: |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 63 | file: |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 64 | type: string |
| 65 | description: multipartFile |
| 66 | format: binary |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 67 | example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 68 | |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 69 | ModuleReferences: |
| 70 | type: object |
| 71 | title: Module reference object |
| 72 | properties: |
| 73 | name: |
| 74 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 75 | example: my-module-reference-name |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 76 | namespace: |
| 77 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 78 | example: my-module-reference-namespace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 79 | revision: |
| 80 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 81 | example: my-module-reference-revision |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 82 | |
| 83 | SchemaSetDetails: |
| 84 | type: object |
| 85 | title: Schema set details by dataspace and schemasetName |
lukegleeson | d5bda88 | 2022-03-02 14:32:47 +0000 | [diff] [blame] | 86 | required: |
| 87 | - "moduleReferences" |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 88 | properties: |
| 89 | dataspaceName: |
| 90 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 91 | example: my-dataspace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 92 | moduleReferences: |
| 93 | type: array |
| 94 | items: |
| 95 | $ref: '#/components/schemas/ModuleReferences' |
| 96 | name: |
| 97 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 98 | example: my-schema-set |
| 99 | |
| 100 | examples: |
puthuparambil.aditya | cc17ae5 | 2022-02-25 13:24:03 +0000 | [diff] [blame] | 101 | dataSample: |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 102 | value: |
| 103 | test:bookstore: |
| 104 | bookstore-name: Chapters |
| 105 | categories: |
| 106 | - code: 01 |
| 107 | name: SciFi |
| 108 | - code: 02 |
| 109 | name: kids |
Michal Jagiello | 6ce84d9 | 2022-12-13 07:40:19 +0000 | [diff] [blame] | 110 | dataSampleXml: |
| 111 | value: |
| 112 | <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> |
| 113 | <bookstore xmlns="org:onap:ccsdk:sample"> |
| 114 | <bookstore-name>Chapters</bookstore-name> |
| 115 | <categories> |
| 116 | <code>1</code> |
| 117 | <name>SciFi</name> |
| 118 | </categories> |
| 119 | </bookstore> |
| 120 | </stores> |
rajesh.kumar | a317890 | 2022-12-14 14:27:29 +0000 | [diff] [blame] | 121 | dataSampleAcrossAnchors: |
| 122 | value: |
| 123 | - anchorName: bookstore1 |
| 124 | dataNode: |
| 125 | test:bookstore: |
| 126 | bookstore-name: Chapters |
| 127 | categories: |
| 128 | - code: 01 |
| 129 | name: SciFi |
| 130 | - code: 02 |
| 131 | name: kids |
| 132 | - anchorName: bookstore2 |
| 133 | dataNode: |
| 134 | test:bookstore: |
| 135 | bookstore-name: Chapters |
| 136 | categories: |
| 137 | - code: 01 |
| 138 | name: SciFi |
| 139 | - code: 02 |
| 140 | name: kids |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 141 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 142 | parameters: |
| 143 | dataspaceNameInQuery: |
| 144 | name: dataspace-name |
| 145 | in: query |
| 146 | description: dataspace-name |
| 147 | required: true |
| 148 | schema: |
| 149 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 150 | example: my-dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 151 | dataspaceNameInPath: |
| 152 | name: dataspace-name |
| 153 | in: path |
| 154 | description: dataspace-name |
| 155 | required: true |
| 156 | schema: |
| 157 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 158 | example: my-dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 159 | anchorNameInPath: |
| 160 | name: anchor-name |
| 161 | in: path |
| 162 | description: anchor-name |
| 163 | required: true |
| 164 | schema: |
| 165 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 166 | example: my-anchor |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 167 | schemaSetNameInQuery: |
| 168 | name: schema-set-name |
| 169 | in: query |
| 170 | description: schema-set-name |
| 171 | required: true |
| 172 | schema: |
| 173 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 174 | example: my-schema-set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 175 | schemaSetNameInPath: |
| 176 | name: schema-set-name |
| 177 | in: path |
| 178 | description: schema-set-name |
| 179 | required: true |
| 180 | schema: |
| 181 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 182 | example: my-schema-set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 183 | anchorNameInQuery: |
| 184 | name: anchor-name |
| 185 | in: query |
| 186 | description: anchor-name |
| 187 | required: true |
| 188 | schema: |
| 189 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 190 | example: my-anchor |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 191 | xpathInQuery: |
Ruslan Kashapov | 24c72db | 2021-02-09 17:25:18 +0200 | [diff] [blame] | 192 | name: xpath |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 193 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 194 | description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 195 | required: false |
| 196 | schema: |
| 197 | type: string |
| 198 | default: / |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 199 | examples: |
| 200 | container xpath: |
| 201 | value: /shops/bookstore |
| 202 | list attributes xpath: |
| 203 | value: /shops/bookstore/categories[@code=1] |
Ruslan Kashapov | 0905ac1 | 2021-05-05 13:11:50 +0300 | [diff] [blame] | 204 | requiredXpathInQuery: |
| 205 | name: xpath |
| 206 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 207 | description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html |
Ruslan Kashapov | 0905ac1 | 2021-05-05 13:11:50 +0300 | [diff] [blame] | 208 | required: true |
| 209 | schema: |
| 210 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 211 | examples: |
| 212 | container xpath: |
| 213 | value: /shops/bookstore |
| 214 | list attributes xpath: |
| 215 | value: /shops/bookstore/categories[@code=1] |
niamhcore | 53f07ac | 2021-02-19 13:14:40 +0000 | [diff] [blame] | 216 | cpsPathInQuery: |
| 217 | name: cps-path |
| 218 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 219 | description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html |
niamhcore | 53f07ac | 2021-02-19 13:14:40 +0000 | [diff] [blame] | 220 | required: false |
| 221 | schema: |
| 222 | type: string |
| 223 | default: / |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 224 | examples: |
| 225 | container cps path: |
| 226 | value: //bookstore |
| 227 | list attributes cps path: |
| 228 | value: //categories[@code=1] |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 229 | includeDescendantsOptionInQuery: |
| 230 | name: include-descendants |
| 231 | in: query |
| 232 | description: include-descendants |
| 233 | required: false |
| 234 | schema: |
| 235 | type: boolean |
| 236 | default: false |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 237 | example: false |
aditya puthuparambil | 673c6d9 | 2021-08-24 17:44:34 +0100 | [diff] [blame] | 238 | observedTimestampInQuery: |
| 239 | name: observed-timestamp |
| 240 | in: query |
| 241 | description: observed-timestamp |
| 242 | required: false |
| 243 | schema: |
| 244 | type: string |
| 245 | example: '2021-03-21T00:10:34.030-0100' |
rajesh.kumar | 897686f | 2022-12-14 08:13:29 +0000 | [diff] [blame] | 246 | apiVersionInPath: |
| 247 | name: apiVersion |
| 248 | in: path |
| 249 | description: apiVersion |
| 250 | required: true |
| 251 | schema: |
| 252 | type: string |
| 253 | enum: [v1, v2] |
| 254 | default: v2 |
Michal Jagiello | 6ce84d9 | 2022-12-13 07:40:19 +0000 | [diff] [blame] | 255 | contentTypeHeader: |
| 256 | name: Content-Type |
| 257 | in: header |
| 258 | description: Content type header |
| 259 | schema: |
| 260 | type: string |
| 261 | example: 'application/json' |
| 262 | required: true |
rajesh.kumar | cc21a02 | 2022-12-06 11:47:24 +0000 | [diff] [blame] | 263 | descendantsInQuery: |
| 264 | name: descendants |
| 265 | in: query |
rajesh.kumar | 5d881c3 | 2023-02-03 06:36:40 +0000 | [diff] [blame] | 266 | description: Number of descendants to query. Allowed values are 'none', 'all', -1 (for all), 0 (for none) and any positive number. |
rajesh.kumar | cc21a02 | 2022-12-06 11:47:24 +0000 | [diff] [blame] | 267 | required: false |
| 268 | schema: |
| 269 | type: string |
| 270 | default: none |
| 271 | example: 3 |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 272 | |
| 273 | responses: |
| 274 | NotFound: |
| 275 | description: The specified resource was not found |
| 276 | content: |
| 277 | application/json: |
| 278 | schema: |
| 279 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 280 | example: |
| 281 | status: 404 |
| 282 | message: Resource Not Found |
| 283 | details: The requested resource is not found |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 284 | Unauthorized: |
| 285 | description: Unauthorized |
| 286 | content: |
| 287 | application/json: |
| 288 | schema: |
| 289 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 290 | example: |
| 291 | status: 401 |
| 292 | message: Unauthorized request |
| 293 | details: This request is unauthorized |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 294 | Forbidden: |
| 295 | description: Forbidden |
| 296 | content: |
| 297 | application/json: |
| 298 | schema: |
| 299 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 300 | example: |
| 301 | status: 403 |
| 302 | message: Request Forbidden |
| 303 | details: This request is forbidden |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 304 | BadRequest: |
| 305 | description: Bad Request |
| 306 | content: |
| 307 | application/json: |
| 308 | schema: |
| 309 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 310 | example: |
| 311 | status: 400 |
| 312 | message: Bad Request |
| 313 | details: The provided request is not valid |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 314 | Conflict: |
| 315 | description: Conflict |
| 316 | content: |
| 317 | application/json: |
| 318 | schema: |
| 319 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 320 | example: |
| 321 | status: 409 |
| 322 | message: Conflicting request |
| 323 | details: The request cannot be processed as the resource is in use. |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 324 | Ok: |
| 325 | description: OK |
| 326 | content: |
| 327 | application/json: |
| 328 | schema: |
| 329 | type: object |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 330 | examples: |
puthuparambil.aditya | cc17ae5 | 2022-02-25 13:24:03 +0000 | [diff] [blame] | 331 | dataSample: |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 332 | value: "" |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 333 | Created: |
| 334 | description: Created |
| 335 | content: |
| 336 | text/plain: |
| 337 | schema: |
| 338 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 339 | example: my-resource |
rajesh.kumar | 897686f | 2022-12-14 08:13:29 +0000 | [diff] [blame] | 340 | CreatedV2: |
| 341 | description: Created without response body |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 342 | InternalServerError: |
| 343 | description: Internal Server Error |
| 344 | content: |
| 345 | application/json: |
| 346 | schema: |
| 347 | $ref: "#/components/schemas/ErrorMessage" |
| 348 | example: |
| 349 | status: 500 |
| 350 | message: Internal Server Error |
| 351 | details: Internal Server Error occurred |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 352 | NoContent: |
| 353 | description: No Content |
| 354 | content: {} |