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. |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 15 | # |
| 16 | # SPDX-License-Identifier: Apache-2.0 |
shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 17 | # ============LICENSE_END========================================================= |
| 18 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 19 | components: |
| 20 | schemas: |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 21 | |
| 22 | AnchorDetails: |
| 23 | type: object |
| 24 | title: Anchor details by anchor Name |
| 25 | properties: |
| 26 | name: |
| 27 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 28 | example: my-anchor |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 29 | dataspaceName: |
| 30 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 31 | example: my-dataspace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 32 | schemaSetName: |
| 33 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 34 | example: my-schema-set |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 35 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 36 | ErrorMessage: |
| 37 | type: object |
| 38 | title: Error |
| 39 | properties: |
| 40 | status: |
| 41 | type: string |
| 42 | message: |
| 43 | type: string |
| 44 | details: |
| 45 | type: string |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 46 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 47 | MultipartFile: |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 48 | type: object |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 49 | required: |
| 50 | - file |
| 51 | properties: |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 52 | file: |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 53 | type: string |
| 54 | description: multipartFile |
| 55 | format: binary |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 56 | 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] | 57 | |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 58 | ModuleReferences: |
| 59 | type: object |
| 60 | title: Module reference object |
| 61 | properties: |
| 62 | name: |
| 63 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 64 | example: my-module-reference-name |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 65 | namespace: |
| 66 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 67 | example: my-module-reference-namespace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 68 | revision: |
| 69 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 70 | example: my-module-reference-revision |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 71 | |
| 72 | SchemaSetDetails: |
| 73 | type: object |
| 74 | title: Schema set details by dataspace and schemasetName |
| 75 | properties: |
| 76 | dataspaceName: |
| 77 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 78 | example: my-dataspace |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 79 | moduleReferences: |
| 80 | type: array |
| 81 | items: |
| 82 | $ref: '#/components/schemas/ModuleReferences' |
| 83 | name: |
| 84 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 85 | example: my-schema-set |
| 86 | |
| 87 | examples: |
| 88 | dataSampleRequest: |
| 89 | value: |
| 90 | test:bookstore: |
| 91 | bookstore-name: Chapters |
| 92 | categories: |
| 93 | - code: 01 |
| 94 | name: SciFi |
| 95 | - code: 02 |
| 96 | name: kids |
| 97 | |
| 98 | dataSampleResponse: |
| 99 | summary: The data node returned does not include the root node. This is being investigated as a part of CPS-461 |
| 100 | value: |
| 101 | bookstore-name: Chapters |
| 102 | categories: |
| 103 | - code: 01 |
| 104 | name: SciFi |
| 105 | - code: 02 |
| 106 | name: kids |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 107 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 108 | parameters: |
| 109 | dataspaceNameInQuery: |
| 110 | name: dataspace-name |
| 111 | in: query |
| 112 | description: dataspace-name |
| 113 | required: true |
| 114 | schema: |
| 115 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 116 | example: my-dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 117 | dataspaceNameInPath: |
| 118 | name: dataspace-name |
| 119 | in: path |
| 120 | description: dataspace-name |
| 121 | required: true |
| 122 | schema: |
| 123 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 124 | example: my-dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 125 | anchorNameInPath: |
| 126 | name: anchor-name |
| 127 | in: path |
| 128 | description: anchor-name |
| 129 | required: true |
| 130 | schema: |
| 131 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 132 | example: my-anchor |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 133 | schemaSetNameInQuery: |
| 134 | name: schema-set-name |
| 135 | in: query |
| 136 | description: schema-set-name |
| 137 | required: true |
| 138 | schema: |
| 139 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 140 | example: my-schema-set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 141 | schemaSetNameInPath: |
| 142 | name: schema-set-name |
| 143 | in: path |
| 144 | description: schema-set-name |
| 145 | required: true |
| 146 | schema: |
| 147 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 148 | example: my-schema-set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 149 | anchorNameInQuery: |
| 150 | name: anchor-name |
| 151 | in: query |
| 152 | description: anchor-name |
| 153 | required: true |
| 154 | schema: |
| 155 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 156 | example: my-anchor |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 157 | xpathInQuery: |
Ruslan Kashapov | 24c72db | 2021-02-09 17:25:18 +0200 | [diff] [blame] | 158 | name: xpath |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 159 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 160 | 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] | 161 | required: false |
| 162 | schema: |
| 163 | type: string |
| 164 | default: / |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 165 | examples: |
| 166 | container xpath: |
| 167 | value: /shops/bookstore |
| 168 | list attributes xpath: |
| 169 | value: /shops/bookstore/categories[@code=1] |
Ruslan Kashapov | 0905ac1 | 2021-05-05 13:11:50 +0300 | [diff] [blame] | 170 | requiredXpathInQuery: |
| 171 | name: xpath |
| 172 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 173 | 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] | 174 | required: true |
| 175 | schema: |
| 176 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 177 | examples: |
| 178 | container xpath: |
| 179 | value: /shops/bookstore |
| 180 | list attributes xpath: |
| 181 | value: /shops/bookstore/categories[@code=1] |
niamhcore | 53f07ac | 2021-02-19 13:14:40 +0000 | [diff] [blame] | 182 | cpsPathInQuery: |
| 183 | name: cps-path |
| 184 | in: query |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 185 | 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] | 186 | required: false |
| 187 | schema: |
| 188 | type: string |
| 189 | default: / |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 190 | examples: |
| 191 | container cps path: |
| 192 | value: //bookstore |
| 193 | list attributes cps path: |
| 194 | value: //categories[@code=1] |
Ruslan Kashapov | 2098392 | 2021-02-01 10:47:25 +0200 | [diff] [blame] | 195 | includeDescendantsOptionInQuery: |
| 196 | name: include-descendants |
| 197 | in: query |
| 198 | description: include-descendants |
| 199 | required: false |
| 200 | schema: |
| 201 | type: boolean |
| 202 | default: false |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 203 | example: false |
aditya puthuparambil | 673c6d9 | 2021-08-24 17:44:34 +0100 | [diff] [blame] | 204 | observedTimestampInQuery: |
| 205 | name: observed-timestamp |
| 206 | in: query |
| 207 | description: observed-timestamp |
| 208 | required: false |
| 209 | schema: |
| 210 | type: string |
| 211 | example: '2021-03-21T00:10:34.030-0100' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 212 | |
| 213 | responses: |
| 214 | NotFound: |
| 215 | description: The specified resource was not found |
| 216 | content: |
| 217 | application/json: |
| 218 | schema: |
| 219 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 220 | example: |
| 221 | status: 404 |
| 222 | message: Resource Not Found |
| 223 | details: The requested resource is not found |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 224 | Unauthorized: |
| 225 | description: Unauthorized |
| 226 | content: |
| 227 | application/json: |
| 228 | schema: |
| 229 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 230 | example: |
| 231 | status: 401 |
| 232 | message: Unauthorized request |
| 233 | details: This request is unauthorized |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 234 | Forbidden: |
| 235 | description: Forbidden |
| 236 | content: |
| 237 | application/json: |
| 238 | schema: |
| 239 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 240 | example: |
| 241 | status: 403 |
| 242 | message: Request Forbidden |
| 243 | details: This request is forbidden |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 244 | BadRequest: |
| 245 | description: Bad Request |
| 246 | content: |
| 247 | application/json: |
| 248 | schema: |
| 249 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 250 | example: |
| 251 | status: 400 |
| 252 | message: Bad Request |
| 253 | details: The provided request is not valid |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 254 | Conflict: |
| 255 | description: Conflict |
| 256 | content: |
| 257 | application/json: |
| 258 | schema: |
| 259 | $ref: '#/components/schemas/ErrorMessage' |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 260 | example: |
| 261 | status: 409 |
| 262 | message: Conflicting request |
| 263 | details: The request cannot be processed as the resource is in use. |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 264 | Ok: |
| 265 | description: OK |
| 266 | content: |
| 267 | application/json: |
| 268 | schema: |
| 269 | type: object |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 270 | examples: |
| 271 | dataSampleResponse: |
| 272 | value: "" |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 273 | Created: |
| 274 | description: Created |
| 275 | content: |
| 276 | text/plain: |
| 277 | schema: |
| 278 | type: string |
puthuparambil.aditya | 5d8b241 | 2021-11-24 13:35:10 +0000 | [diff] [blame] | 279 | example: my-resource |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 280 | NoContent: |
| 281 | description: No Content |
| 282 | content: {} |