blob: a2587eb56d827db218e574d283dd5ec69d829100 [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:
144 - action: "ADD"
145 xpath: "/bookstore/categories/[@code=3]"
146 target-data:
147 code: 3,
148 name: "kidz"
149 - action: "REMOVE"
150 xpath: "/bookstore/categories/[@code=1]"
151 source-data:
152 code: 1,
153 name: "Fiction"
154 - action: "UPDATE"
155 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
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000186 schemaSetNameInQuery:
187 name: schema-set-name
188 in: query
189 description: schema-set-name
190 required: true
191 schema:
192 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000193 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000194 schemaSetNameInPath:
195 name: schema-set-name
196 in: path
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 anchorNameInQuery:
203 name: anchor-name
204 in: query
205 description: anchor-name
206 required: true
207 schema:
208 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000209 example: my-anchor
Arpit Singh0339c712023-08-02 18:35:31 +0530210 targetAnchorNameInQuery:
211 name: target-anchor-name
212 in: query
213 description: target-anchor-name
214 required: true
215 schema:
216 type: string
217 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200218 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200219 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200220 in: query
emaclee50e000f2023-04-18 14:49:24 +0100221 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 +0200222 required: false
223 schema:
224 type: string
225 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000226 examples:
227 container xpath:
228 value: /shops/bookstore
229 list attributes xpath:
230 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300231 requiredXpathInQuery:
232 name: xpath
233 in: query
emaclee50e000f2023-04-18 14:49:24 +0100234 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 +0300235 required: true
236 schema:
237 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000238 examples:
239 container xpath:
240 value: /shops/bookstore
241 list attributes xpath:
242 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000243 cpsPathInQuery:
244 name: cps-path
245 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000246 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 +0000247 required: false
248 schema:
249 type: string
250 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000251 examples:
252 container cps path:
253 value: //bookstore
254 list attributes cps path:
255 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200256 includeDescendantsOptionInQuery:
257 name: include-descendants
258 in: query
259 description: include-descendants
260 required: false
261 schema:
262 type: boolean
263 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000264 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100265 observedTimestampInQuery:
266 name: observed-timestamp
267 in: query
268 description: observed-timestamp
269 required: false
270 schema:
271 type: string
272 example: '2021-03-21T00:10:34.030-0100'
rajesh.kumar897686f2022-12-14 08:13:29 +0000273 apiVersionInPath:
274 name: apiVersion
275 in: path
276 description: apiVersion
277 required: true
278 schema:
279 type: string
280 enum: [v1, v2]
281 default: v2
Rudrangi Anupriya760dd952024-07-11 21:56:24 +0530282 contentTypeInHeader:
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000283 name: Content-Type
284 in: header
Rudrangi Anupriya760dd952024-07-11 21:56:24 +0530285 description: Content type in header
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000286 schema:
287 type: string
288 example: 'application/json'
289 required: true
rajesh.kumarcc21a022022-12-06 11:47:24 +0000290 descendantsInQuery:
291 name: descendants
292 in: query
Rudrangi Anupriya8126f032023-07-28 14:28:54 +0530293 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 +0000294 required: false
295 schema:
296 type: string
297 default: none
298 example: 3
rajesh.kumarf248b5d2023-04-25 11:58:35 +0530299 pageIndexInQuery:
300 name: pageIndex
301 in: query
302 description: page index for pagination over anchors. It must be greater then zero if provided.
303 required: false
304 schema:
305 type: integer
306 example: 1
307 pageSizeInQuery:
308 name: pageSize
309 in: query
310 description: number of records (anchors) per page. It must be greater then zero if provided.
311 required: false
312 schema:
313 type: integer
314 example: 10
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000315
316 responses:
317 NotFound:
318 description: The specified resource was not found
319 content:
320 application/json:
321 schema:
322 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000323 example:
324 status: 404
325 message: Resource Not Found
326 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000327 Unauthorized:
328 description: Unauthorized
329 content:
330 application/json:
331 schema:
332 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000333 example:
334 status: 401
335 message: Unauthorized request
336 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000337 Forbidden:
338 description: Forbidden
339 content:
340 application/json:
341 schema:
342 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000343 example:
344 status: 403
345 message: Request Forbidden
346 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000347 BadRequest:
348 description: Bad Request
349 content:
350 application/json:
351 schema:
352 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000353 example:
354 status: 400
355 message: Bad Request
356 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200357 Conflict:
358 description: Conflict
359 content:
360 application/json:
361 schema:
362 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000363 example:
364 status: 409
365 message: Conflicting request
366 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000367 Ok:
368 description: OK
369 content:
370 application/json:
371 schema:
372 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000373 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000374 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000375 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000376 Created:
377 description: Created
378 content:
Arpit Singh44bca362024-07-17 10:24:44 +0530379 application/json:
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000380 schema:
381 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000382 example: my-resource
rajesh.kumar897686f2022-12-14 08:13:29 +0000383 CreatedV2:
384 description: Created without response body
JosephKeenan909a8502022-01-28 10:02:24 +0000385 InternalServerError:
386 description: Internal Server Error
387 content:
388 application/json:
389 schema:
390 $ref: "#/components/schemas/ErrorMessage"
391 example:
392 status: 500
393 message: Internal Server Error
394 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000395 NoContent:
396 description: No Content
397 content: {}