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