blob: 40f0e170ff5618df6738d8ff67b2a6bafe715069 [file] [log] [blame]
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +00001# ============LICENSE_START=======================================================
2# Copyright (c) 2021-2022 Bell Canada.
3# Modifications Copyright (C) 2021-2023 Nordix Foundation
4# Modifications Copyright (C) 2022-2024 TechMahindra Ltd.
5# Modifications Copyright (C) 2022 Deutsche Telekom AG
6# ================================================================================
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.
18#
19# SPDX-License-Identifier: Apache-2.0
20# ============LICENSE_END=========================================================
21
22components:
23 schemas:
24
25 AnchorDetails:
26 type: object
27 title: Anchor details by anchor Name
28 properties:
29 name:
30 type: string
31 example: my-anchor
32 dataspaceName:
33 type: string
34 example: my-dataspace
35 schemaSetName:
36 type: string
37 example: my-schema-set
38
39 DataspaceDetails:
40 type: object
41 title: Dataspace details by dataspace Name
42 properties:
43 name:
44 type: string
45 example: my-dataspace
46
47 ErrorMessage:
48 type: object
49 title: Error
50 properties:
51 status:
52 type: string
53 message:
54 type: string
55 details:
56 type: string
57
58 MultipartFile:
59 type: object
60 required:
61 - file
62 properties:
63 file:
64 type: string
65 description: multipartFile
66 format: binary
67
68 ModuleReferences:
69 type: object
70 title: Module reference object
71 properties:
72 name:
73 type: string
74 example: my-module-reference-name
75 namespace:
76 type: string
77 example: my-module-reference-namespace
78 revision:
79 type: string
80 example: my-module-reference-revision
81
82 SchemaSetDetails:
83 type: object
84 title: Schema set details by dataspace and schemasetName
85 required:
86 - "moduleReferences"
87 properties:
88 dataspaceName:
89 type: string
90 example: my-dataspace
91 moduleReferences:
92 type: array
93 items:
94 $ref: '#/components/schemas/ModuleReferences'
95 name:
96 type: string
97 example: my-schema-set
98
99 examples:
100 dataSample:
101 value:
102 test:bookstore:
103 bookstore-name: Chapters
104 categories:
105 - code: 01
106 name: SciFi
107 - code: 02
108 name: kids
109 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 <code>2</code>
118 <name>kids</name>
119 </categories>
120 </bookstore>
121 </stores>
122 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
142 deltaReportSample:
143 value:
144 - action: "create"
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: "replace"
155 xpath: "/bookstore/categories/[@code=2]"
156 source-data:
157 name: "Funny"
158 target-data:
159 name: "Comic"
160
161 parameters:
162 dataspaceNameInQuery:
163 name: dataspace-name
164 in: query
165 description: dataspace-name
166 required: true
167 schema:
168 type: string
169 example: my-dataspace
170 dataspaceNameInPath:
171 name: dataspace-name
172 in: path
173 description: dataspace-name
174 required: true
175 schema:
176 type: string
177 example: my-dataspace
178 anchorNameInPath:
179 name: anchor-name
180 in: path
181 description: anchor-name
182 required: true
183 schema:
184 type: string
185 example: my-anchor
186 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
194 schemaSetNameInQuery:
195 name: schema-set-name
196 in: query
197 description: schema-set-name
198 required: true
199 schema:
200 type: string
201 example: my-schema-set
202 schemaSetNameInPath:
203 name: schema-set-name
204 in: path
205 description: schema-set-name
206 required: true
207 schema:
208 type: string
209 example: my-schema-set
210 anchorNameInQuery:
211 name: anchor-name
212 in: query
213 description: anchor-name
214 required: true
215 schema:
216 type: string
217 example: my-anchor
218 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
226 xpathInQuery:
227 name: xpath
228 in: query
229 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
230 required: false
231 schema:
232 type: string
233 default: /
234 examples:
235 container xpath:
236 value: /shops/bookstore
237 list attributes xpath:
238 value: /shops/bookstore/categories[@code=1]
239 requiredXpathInQuery:
240 name: xpath
241 in: query
242 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html
243 required: true
244 schema:
245 type: string
246 examples:
247 container xpath:
248 value: /shops/bookstore
249 list attributes xpath:
250 value: /shops/bookstore/categories[@code=1]
251 cpsPathInQuery:
252 name: cps-path
253 in: query
254 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
255 required: false
256 schema:
257 type: string
258 default: /
259 examples:
260 container cps path:
261 value: //bookstore
262 list attributes cps path:
263 value: //categories[@code=1]
264 includeDescendantsOptionInQuery:
265 name: include-descendants
266 in: query
267 description: include-descendants
268 required: false
269 schema:
270 type: boolean
271 default: false
272 example: false
273 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'
281 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
290 contentTypeInHeader:
291 name: Content-Type
292 in: header
293 description: Content type in header
294 schema:
295 type: string
296 example: 'application/json'
297 required: true
298 descendantsInQuery:
299 name: descendants
300 in: query
301 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.
302 required: false
303 schema:
304 type: string
305 default: none
306 example: 3
307 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
Arpit Singh07acbb42024-08-09 12:23:49 +0530323 dryRunInQuery:
324 name: dry-run
325 in: query
326 description: Boolean flag to validate data, without persisting it. Default value is set to false.
327 required: false
328 schema:
329 type: boolean
330 default: false
331 example: false
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +0000332
333 responses:
334 NotFound:
335 description: The specified resource was not found
336 content:
337 application/json:
338 schema:
339 $ref: '#/components/schemas/ErrorMessage'
340 example:
341 status: 404
342 message: Resource Not Found
343 details: The requested resource is not found
344 Unauthorized:
345 description: Unauthorized
346 content:
347 application/json:
348 schema:
349 $ref: '#/components/schemas/ErrorMessage'
350 example:
351 status: 401
352 message: Unauthorized request
353 details: This request is unauthorized
354 Forbidden:
355 description: Forbidden
356 content:
357 application/json:
358 schema:
359 $ref: '#/components/schemas/ErrorMessage'
360 example:
361 status: 403
362 message: Request Forbidden
363 details: This request is forbidden
364 BadRequest:
365 description: Bad Request
366 content:
367 application/json:
368 schema:
369 $ref: '#/components/schemas/ErrorMessage'
370 example:
371 status: 400
372 message: Bad Request
373 details: The provided request is not valid
374 Conflict:
375 description: Conflict
376 content:
377 application/json:
378 schema:
379 $ref: '#/components/schemas/ErrorMessage'
380 example:
381 status: 409
382 message: Conflicting request
383 details: The request cannot be processed as the resource is in use.
384 Ok:
385 description: OK
386 content:
387 application/json:
388 schema:
389 type: object
390 examples:
391 dataSample:
392 value: ""
393 Created:
394 description: Created
395 content:
396 application/json:
397 schema:
398 type: string
399 example: my-resource
400 CreatedV2:
401 description: Created without response body
402 InternalServerError:
403 description: Internal Server Error
404 content:
405 application/json:
406 schema:
407 $ref: "#/components/schemas/ErrorMessage"
408 example:
409 status: 500
410 message: Internal Server Error
411 details: Internal Server Error occurred
412 NoContent:
413 description: No Content
414 content: {}