blob: 25ef6a452afdc531a8cc6aad713e841a54080144 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
puthuparambil.adityacc17ae52022-02-25 13:24:03 +00002# Copyright (c) 2021-2022 Bell Canada.
egernugfb09b7c2023-10-12 13:33:08 +01003# Modifications Copyright (C) 2021-2023 Nordix Foundation
Rudrangi Anupriya1decb392024-06-05 23:55:14 +05304# Modifications Copyright (C) 2022-2024 TechMahindra Ltd.
Michal Jagiello6ce84d92022-12-13 07:40:19 +00005# Modifications Copyright (C) 2022 Deutsche Telekom AG
shivasubedi8df61a92021-06-16 14:43:18 +01006# ================================================================================
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 Kumari4d520012021-08-30 11:50:43 -040018#
19# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010020# ============LICENSE_END=========================================================
21
puthuparambil.aditya001e7732021-01-13 12:06:20 +000022components:
23 schemas:
JosephKeenanc6865f32021-06-08 13:16:37 +010024
25 AnchorDetails:
26 type: object
27 title: Anchor details by anchor Name
28 properties:
29 name:
30 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000031 example: my-anchor
JosephKeenanc6865f32021-06-08 13:16:37 +010032 dataspaceName:
33 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000034 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010035 schemaSetName:
36 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000037 example: my-schema-set
JosephKeenanc6865f32021-06-08 13:16:37 +010038
rajesh.kumarcec0cb72022-09-06 11:47:18 +000039 DataspaceDetails:
40 type: object
41 title: Dataspace details by dataspace Name
42 properties:
43 name:
44 type: string
45 example: my-dataspace
46
puthuparambil.aditya001e7732021-01-13 12:06:20 +000047 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.Chail6d13f162021-01-26 05:58:39 +000057
puthuparambil.aditya001e7732021-01-13 12:06:20 +000058 MultipartFile:
Renu Kumari4d520012021-08-30 11:50:43 -040059 type: object
puthuparambil.aditya001e7732021-01-13 12:06:20 +000060 required:
61 - file
62 properties:
Renu Kumari4d520012021-08-30 11:50:43 -040063 file:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000064 type: string
65 description: multipartFile
66 format: binary
67
JosephKeenanc6865f32021-06-08 13:16:37 +010068 ModuleReferences:
69 type: object
70 title: Module reference object
71 properties:
72 name:
73 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000074 example: my-module-reference-name
JosephKeenanc6865f32021-06-08 13:16:37 +010075 namespace:
76 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000077 example: my-module-reference-namespace
JosephKeenanc6865f32021-06-08 13:16:37 +010078 revision:
79 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000080 example: my-module-reference-revision
JosephKeenanc6865f32021-06-08 13:16:37 +010081
82 SchemaSetDetails:
83 type: object
84 title: Schema set details by dataspace and schemasetName
lukegleesond5bda882022-03-02 14:32:47 +000085 required:
86 - "moduleReferences"
JosephKeenanc6865f32021-06-08 13:16:37 +010087 properties:
88 dataspaceName:
89 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000090 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010091 moduleReferences:
92 type: array
93 items:
94 $ref: '#/components/schemas/ModuleReferences'
95 name:
96 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000097 example: my-schema-set
98
99 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000100 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000101 value:
102 test:bookstore:
103 bookstore-name: Chapters
104 categories:
105 - code: 01
106 name: SciFi
107 - code: 02
108 name: kids
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000109 dataSampleXml:
110 value:
111 <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
112 <bookstore xmlns="org:onap:ccsdk:sample">
113 <bookstore-name>Chapters</bookstore-name>
114 <categories>
115 <code>1</code>
116 <name>SciFi</name>
Rudrangi Anupriya1decb392024-06-05 23:55:14 +0530117 <code>2</code>
118 <name>kids</name>
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000119 </categories>
120 </bookstore>
121 </stores>
rajesh.kumara3178902022-12-14 14:27:29 +0000122 dataSampleAcrossAnchors:
123 value:
124 - anchorName: bookstore1
125 dataNode:
126 test:bookstore:
127 bookstore-name: Chapters
128 categories:
129 - code: 01
130 name: SciFi
131 - code: 02
132 name: kids
133 - anchorName: bookstore2
134 dataNode:
135 test:bookstore:
136 bookstore-name: Chapters
137 categories:
138 - code: 01
139 name: SciFi
140 - code: 02
141 name: kids
Arpit Singh0339c712023-08-02 18:35:31 +0530142 deltaReportSample:
143 value:
Arpit Singh3c8539c2024-09-04 11:02:06 +0530144 - action: "create"
Arpit Singh0339c712023-08-02 18:35:31 +0530145 xpath: "/bookstore/categories/[@code=3]"
146 target-data:
147 code: 3,
148 name: "kidz"
Arpit Singh3c8539c2024-09-04 11:02:06 +0530149 - action: "remove"
Arpit Singh0339c712023-08-02 18:35:31 +0530150 xpath: "/bookstore/categories/[@code=1]"
151 source-data:
152 code: 1,
153 name: "Fiction"
Arpit Singh3c8539c2024-09-04 11:02:06 +0530154 - action: "replace"
Arpit Singh0339c712023-08-02 18:35:31 +0530155 xpath: "/bookstore/categories/[@code=2]"
156 source-data:
157 name: "Funny"
158 target-data:
159 name: "Comic"
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000160
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000161 parameters:
162 dataspaceNameInQuery:
163 name: dataspace-name
164 in: query
165 description: dataspace-name
166 required: true
167 schema:
168 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000169 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000170 dataspaceNameInPath:
171 name: dataspace-name
172 in: path
173 description: dataspace-name
174 required: true
175 schema:
176 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000177 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000178 anchorNameInPath:
179 name: anchor-name
180 in: path
181 description: anchor-name
182 required: true
183 schema:
184 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000185 example: my-anchor
Arpit Singhd6de3f32024-07-09 17:14:02 +0530186 sourceAnchorNameInPath:
187 name: source-anchor-name
188 in: path
189 description: source-anchor-name
190 required: true
191 schema:
192 type: string
193 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000194 schemaSetNameInQuery:
195 name: schema-set-name
196 in: query
197 description: schema-set-name
198 required: true
199 schema:
200 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000201 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000202 schemaSetNameInPath:
203 name: schema-set-name
204 in: path
205 description: schema-set-name
206 required: true
207 schema:
208 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000209 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000210 anchorNameInQuery:
211 name: anchor-name
212 in: query
213 description: anchor-name
214 required: true
215 schema:
216 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000217 example: my-anchor
Arpit Singh0339c712023-08-02 18:35:31 +0530218 targetAnchorNameInQuery:
219 name: target-anchor-name
220 in: query
221 description: target-anchor-name
222 required: true
223 schema:
224 type: string
225 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200226 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200227 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200228 in: query
emaclee50e000f2023-04-18 14:49:24 +0100229 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
Ruslan Kashapov20983922021-02-01 10:47:25 +0200230 required: false
231 schema:
232 type: string
233 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000234 examples:
235 container xpath:
236 value: /shops/bookstore
237 list attributes xpath:
238 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300239 requiredXpathInQuery:
240 name: xpath
241 in: query
emaclee50e000f2023-04-18 14:49:24 +0100242 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300243 required: true
244 schema:
245 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000246 examples:
247 container xpath:
248 value: /shops/bookstore
249 list attributes xpath:
250 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000251 cpsPathInQuery:
252 name: cps-path
253 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000254 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
niamhcore53f07ac2021-02-19 13:14:40 +0000255 required: false
256 schema:
257 type: string
258 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000259 examples:
260 container cps path:
261 value: //bookstore
262 list attributes cps path:
263 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200264 includeDescendantsOptionInQuery:
265 name: include-descendants
266 in: query
267 description: include-descendants
268 required: false
269 schema:
270 type: boolean
271 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000272 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100273 observedTimestampInQuery:
274 name: observed-timestamp
275 in: query
276 description: observed-timestamp
277 required: false
278 schema:
279 type: string
280 example: '2021-03-21T00:10:34.030-0100'
rajesh.kumar897686f2022-12-14 08:13:29 +0000281 apiVersionInPath:
282 name: apiVersion
283 in: path
284 description: apiVersion
285 required: true
286 schema:
287 type: string
288 enum: [v1, v2]
289 default: v2
Rudrangi Anupriya760dd952024-07-11 21:56:24 +0530290 contentTypeInHeader:
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000291 name: Content-Type
292 in: header
Rudrangi Anupriya760dd952024-07-11 21:56:24 +0530293 description: Content type in header
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000294 schema:
295 type: string
296 example: 'application/json'
297 required: true
rajesh.kumarcc21a022022-12-06 11:47:24 +0000298 descendantsInQuery:
299 name: descendants
300 in: query
Rudrangi Anupriya8126f032023-07-28 14:28:54 +0530301 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.
rajesh.kumarcc21a022022-12-06 11:47:24 +0000302 required: false
303 schema:
304 type: string
305 default: none
306 example: 3
rajesh.kumarf248b5d2023-04-25 11:58:35 +0530307 pageIndexInQuery:
308 name: pageIndex
309 in: query
310 description: page index for pagination over anchors. It must be greater then zero if provided.
311 required: false
312 schema:
313 type: integer
314 example: 1
315 pageSizeInQuery:
316 name: pageSize
317 in: query
318 description: number of records (anchors) per page. It must be greater then zero if provided.
319 required: false
320 schema:
321 type: integer
322 example: 10
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000323
324 responses:
325 NotFound:
326 description: The specified resource was not found
327 content:
328 application/json:
329 schema:
330 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000331 example:
332 status: 404
333 message: Resource Not Found
334 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000335 Unauthorized:
336 description: Unauthorized
337 content:
338 application/json:
339 schema:
340 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000341 example:
342 status: 401
343 message: Unauthorized request
344 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000345 Forbidden:
346 description: Forbidden
347 content:
348 application/json:
349 schema:
350 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000351 example:
352 status: 403
353 message: Request Forbidden
354 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000355 BadRequest:
356 description: Bad Request
357 content:
358 application/json:
359 schema:
360 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000361 example:
362 status: 400
363 message: Bad Request
364 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200365 Conflict:
366 description: Conflict
367 content:
368 application/json:
369 schema:
370 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000371 example:
372 status: 409
373 message: Conflicting request
374 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000375 Ok:
376 description: OK
377 content:
378 application/json:
379 schema:
380 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000381 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000382 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000383 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000384 Created:
385 description: Created
386 content:
Arpit Singh44bca362024-07-17 10:24:44 +0530387 application/json:
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000388 schema:
389 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000390 example: my-resource
rajesh.kumar897686f2022-12-14 08:13:29 +0000391 CreatedV2:
392 description: Created without response body
JosephKeenan909a8502022-01-28 10:02:24 +0000393 InternalServerError:
394 description: Internal Server Error
395 content:
396 application/json:
397 schema:
398 $ref: "#/components/schemas/ErrorMessage"
399 example:
400 status: 500
401 message: Internal Server Error
402 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000403 NoContent:
404 description: No Content
405 content: {}