blob: 900f663bfcf0d8b4a884d1fc20d39b2f815dbdcc [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.
JosephKeenan909a8502022-01-28 10:02:24 +00003# Modifications Copyright (C) 2021-2022 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
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000067 example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000068
JosephKeenanc6865f32021-06-08 13:16:37 +010069 ModuleReferences:
70 type: object
71 title: Module reference object
72 properties:
73 name:
74 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000075 example: my-module-reference-name
JosephKeenanc6865f32021-06-08 13:16:37 +010076 namespace:
77 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000078 example: my-module-reference-namespace
JosephKeenanc6865f32021-06-08 13:16:37 +010079 revision:
80 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000081 example: my-module-reference-revision
JosephKeenanc6865f32021-06-08 13:16:37 +010082
83 SchemaSetDetails:
84 type: object
85 title: Schema set details by dataspace and schemasetName
lukegleesond5bda882022-03-02 14:32:47 +000086 required:
87 - "moduleReferences"
JosephKeenanc6865f32021-06-08 13:16:37 +010088 properties:
89 dataspaceName:
90 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000091 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010092 moduleReferences:
93 type: array
94 items:
95 $ref: '#/components/schemas/ModuleReferences'
96 name:
97 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000098 example: my-schema-set
99
100 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000101 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000102 value:
103 test:bookstore:
104 bookstore-name: Chapters
105 categories:
106 - code: 01
107 name: SciFi
108 - code: 02
109 name: kids
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000110 dataSampleXml:
111 value:
112 <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
113 <bookstore xmlns="org:onap:ccsdk:sample">
114 <bookstore-name>Chapters</bookstore-name>
115 <categories>
116 <code>1</code>
117 <name>SciFi</name>
118 </categories>
119 </bookstore>
120 </stores>
rajesh.kumara3178902022-12-14 14:27:29 +0000121 dataSampleAcrossAnchors:
122 value:
123 - anchorName: bookstore1
124 dataNode:
125 test:bookstore:
126 bookstore-name: Chapters
127 categories:
128 - code: 01
129 name: SciFi
130 - code: 02
131 name: kids
132 - anchorName: bookstore2
133 dataNode:
134 test:bookstore:
135 bookstore-name: Chapters
136 categories:
137 - code: 01
138 name: SciFi
139 - code: 02
140 name: kids
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000141
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000142 parameters:
143 dataspaceNameInQuery:
144 name: dataspace-name
145 in: query
146 description: dataspace-name
147 required: true
148 schema:
149 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000150 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000151 dataspaceNameInPath:
152 name: dataspace-name
153 in: path
154 description: dataspace-name
155 required: true
156 schema:
157 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000158 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000159 anchorNameInPath:
160 name: anchor-name
161 in: path
162 description: anchor-name
163 required: true
164 schema:
165 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000166 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000167 schemaSetNameInQuery:
168 name: schema-set-name
169 in: query
170 description: schema-set-name
171 required: true
172 schema:
173 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000174 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000175 schemaSetNameInPath:
176 name: schema-set-name
177 in: path
178 description: schema-set-name
179 required: true
180 schema:
181 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000182 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000183 anchorNameInQuery:
184 name: anchor-name
185 in: query
186 description: anchor-name
187 required: true
188 schema:
189 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000190 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200191 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200192 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200193 in: query
emaclee50e000f2023-04-18 14:49:24 +0100194 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 +0200195 required: false
196 schema:
197 type: string
198 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000199 examples:
200 container xpath:
201 value: /shops/bookstore
202 list attributes xpath:
203 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300204 requiredXpathInQuery:
205 name: xpath
206 in: query
emaclee50e000f2023-04-18 14:49:24 +0100207 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 +0300208 required: true
209 schema:
210 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000211 examples:
212 container xpath:
213 value: /shops/bookstore
214 list attributes xpath:
215 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000216 cpsPathInQuery:
217 name: cps-path
218 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000219 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 +0000220 required: false
221 schema:
222 type: string
223 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000224 examples:
225 container cps path:
226 value: //bookstore
227 list attributes cps path:
228 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200229 includeDescendantsOptionInQuery:
230 name: include-descendants
231 in: query
232 description: include-descendants
233 required: false
234 schema:
235 type: boolean
236 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000237 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100238 observedTimestampInQuery:
239 name: observed-timestamp
240 in: query
241 description: observed-timestamp
242 required: false
243 schema:
244 type: string
245 example: '2021-03-21T00:10:34.030-0100'
rajesh.kumar897686f2022-12-14 08:13:29 +0000246 apiVersionInPath:
247 name: apiVersion
248 in: path
249 description: apiVersion
250 required: true
251 schema:
252 type: string
253 enum: [v1, v2]
254 default: v2
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000255 contentTypeHeader:
256 name: Content-Type
257 in: header
258 description: Content type header
259 schema:
260 type: string
261 example: 'application/json'
262 required: true
rajesh.kumarcc21a022022-12-06 11:47:24 +0000263 descendantsInQuery:
264 name: descendants
265 in: query
Rudrangi Anupriya8126f032023-07-28 14:28:54 +0530266 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 +0000267 required: false
268 schema:
269 type: string
270 default: none
271 example: 3
rajesh.kumarf248b5d2023-04-25 11:58:35 +0530272 pageIndexInQuery:
273 name: pageIndex
274 in: query
275 description: page index for pagination over anchors. It must be greater then zero if provided.
276 required: false
277 schema:
278 type: integer
279 example: 1
280 pageSizeInQuery:
281 name: pageSize
282 in: query
283 description: number of records (anchors) per page. It must be greater then zero if provided.
284 required: false
285 schema:
286 type: integer
287 example: 10
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000288
289 responses:
290 NotFound:
291 description: The specified resource was not found
292 content:
293 application/json:
294 schema:
295 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000296 example:
297 status: 404
298 message: Resource Not Found
299 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000300 Unauthorized:
301 description: Unauthorized
302 content:
303 application/json:
304 schema:
305 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000306 example:
307 status: 401
308 message: Unauthorized request
309 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000310 Forbidden:
311 description: Forbidden
312 content:
313 application/json:
314 schema:
315 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000316 example:
317 status: 403
318 message: Request Forbidden
319 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000320 BadRequest:
321 description: Bad Request
322 content:
323 application/json:
324 schema:
325 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000326 example:
327 status: 400
328 message: Bad Request
329 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200330 Conflict:
331 description: Conflict
332 content:
333 application/json:
334 schema:
335 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000336 example:
337 status: 409
338 message: Conflicting request
339 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000340 Ok:
341 description: OK
342 content:
343 application/json:
344 schema:
345 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000346 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000347 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000348 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000349 Created:
350 description: Created
351 content:
352 text/plain:
353 schema:
354 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000355 example: my-resource
rajesh.kumar897686f2022-12-14 08:13:29 +0000356 CreatedV2:
357 description: Created without response body
JosephKeenan909a8502022-01-28 10:02:24 +0000358 InternalServerError:
359 description: Internal Server Error
360 content:
361 application/json:
362 schema:
363 $ref: "#/components/schemas/ErrorMessage"
364 example:
365 status: 500
366 message: Internal Server Error
367 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000368 NoContent:
369 description: No Content
370 content: {}