blob: c1b111bfab3610dae15363d66d76c4a0e653f7fd [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
rajesh.kumarcc21a022022-12-06 11:47:24 +00004# Modifications Copyright (C) 2022-2023 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>
117 </categories>
118 </bookstore>
119 </stores>
rajesh.kumara3178902022-12-14 14:27:29 +0000120 dataSampleAcrossAnchors:
121 value:
122 - anchorName: bookstore1
123 dataNode:
124 test:bookstore:
125 bookstore-name: Chapters
126 categories:
127 - code: 01
128 name: SciFi
129 - code: 02
130 name: kids
131 - anchorName: bookstore2
132 dataNode:
133 test:bookstore:
134 bookstore-name: Chapters
135 categories:
136 - code: 01
137 name: SciFi
138 - code: 02
139 name: kids
Arpit Singh0339c712023-08-02 18:35:31 +0530140 deltaReportSample:
141 value:
142 - action: "ADD"
143 xpath: "/bookstore/categories/[@code=3]"
144 target-data:
145 code: 3,
146 name: "kidz"
147 - action: "REMOVE"
148 xpath: "/bookstore/categories/[@code=1]"
149 source-data:
150 code: 1,
151 name: "Fiction"
152 - action: "UPDATE"
153 xpath: "/bookstore/categories/[@code=2]"
154 source-data:
155 name: "Funny"
156 target-data:
157 name: "Comic"
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000158
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000159 parameters:
160 dataspaceNameInQuery:
161 name: dataspace-name
162 in: query
163 description: dataspace-name
164 required: true
165 schema:
166 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000167 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000168 dataspaceNameInPath:
169 name: dataspace-name
170 in: path
171 description: dataspace-name
172 required: true
173 schema:
174 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000175 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000176 anchorNameInPath:
177 name: anchor-name
178 in: path
179 description: anchor-name
180 required: true
181 schema:
182 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000183 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000184 schemaSetNameInQuery:
185 name: schema-set-name
186 in: query
187 description: schema-set-name
188 required: true
189 schema:
190 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000191 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000192 schemaSetNameInPath:
193 name: schema-set-name
194 in: path
195 description: schema-set-name
196 required: true
197 schema:
198 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000199 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000200 anchorNameInQuery:
201 name: anchor-name
202 in: query
203 description: anchor-name
204 required: true
205 schema:
206 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000207 example: my-anchor
Arpit Singh0339c712023-08-02 18:35:31 +0530208 targetAnchorNameInQuery:
209 name: target-anchor-name
210 in: query
211 description: target-anchor-name
212 required: true
213 schema:
214 type: string
215 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200216 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200217 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200218 in: query
emaclee50e000f2023-04-18 14:49:24 +0100219 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 +0200220 required: false
221 schema:
222 type: string
223 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000224 examples:
225 container xpath:
226 value: /shops/bookstore
227 list attributes xpath:
228 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300229 requiredXpathInQuery:
230 name: xpath
231 in: query
emaclee50e000f2023-04-18 14:49:24 +0100232 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 +0300233 required: true
234 schema:
235 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000236 examples:
237 container xpath:
238 value: /shops/bookstore
239 list attributes xpath:
240 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000241 cpsPathInQuery:
242 name: cps-path
243 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000244 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 +0000245 required: false
246 schema:
247 type: string
248 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000249 examples:
250 container cps path:
251 value: //bookstore
252 list attributes cps path:
253 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200254 includeDescendantsOptionInQuery:
255 name: include-descendants
256 in: query
257 description: include-descendants
258 required: false
259 schema:
260 type: boolean
261 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000262 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100263 observedTimestampInQuery:
264 name: observed-timestamp
265 in: query
266 description: observed-timestamp
267 required: false
268 schema:
269 type: string
270 example: '2021-03-21T00:10:34.030-0100'
rajesh.kumar897686f2022-12-14 08:13:29 +0000271 apiVersionInPath:
272 name: apiVersion
273 in: path
274 description: apiVersion
275 required: true
276 schema:
277 type: string
278 enum: [v1, v2]
279 default: v2
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000280 contentTypeHeader:
281 name: Content-Type
282 in: header
283 description: Content type header
284 schema:
285 type: string
286 example: 'application/json'
287 required: true
rajesh.kumarcc21a022022-12-06 11:47:24 +0000288 descendantsInQuery:
289 name: descendants
290 in: query
Rudrangi Anupriya8126f032023-07-28 14:28:54 +0530291 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 +0000292 required: false
293 schema:
294 type: string
295 default: none
296 example: 3
rajesh.kumarf248b5d2023-04-25 11:58:35 +0530297 pageIndexInQuery:
298 name: pageIndex
299 in: query
300 description: page index for pagination over anchors. It must be greater then zero if provided.
301 required: false
302 schema:
303 type: integer
304 example: 1
305 pageSizeInQuery:
306 name: pageSize
307 in: query
308 description: number of records (anchors) per page. It must be greater then zero if provided.
309 required: false
310 schema:
311 type: integer
312 example: 10
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000313
314 responses:
315 NotFound:
316 description: The specified resource was not found
317 content:
318 application/json:
319 schema:
320 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000321 example:
322 status: 404
323 message: Resource Not Found
324 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000325 Unauthorized:
326 description: Unauthorized
327 content:
328 application/json:
329 schema:
330 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000331 example:
332 status: 401
333 message: Unauthorized request
334 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000335 Forbidden:
336 description: Forbidden
337 content:
338 application/json:
339 schema:
340 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000341 example:
342 status: 403
343 message: Request Forbidden
344 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000345 BadRequest:
346 description: Bad Request
347 content:
348 application/json:
349 schema:
350 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000351 example:
352 status: 400
353 message: Bad Request
354 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200355 Conflict:
356 description: Conflict
357 content:
358 application/json:
359 schema:
360 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000361 example:
362 status: 409
363 message: Conflicting request
364 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000365 Ok:
366 description: OK
367 content:
368 application/json:
369 schema:
370 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000371 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000372 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000373 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000374 Created:
375 description: Created
376 content:
377 text/plain:
378 schema:
379 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000380 example: my-resource
rajesh.kumar897686f2022-12-14 08:13:29 +0000381 CreatedV2:
382 description: Created without response body
JosephKeenan909a8502022-01-28 10:02:24 +0000383 InternalServerError:
384 description: Internal Server Error
385 content:
386 application/json:
387 schema:
388 $ref: "#/components/schemas/ErrorMessage"
389 example:
390 status: 500
391 message: Internal Server Error
392 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000393 NoContent:
394 description: No Content
395 content: {}