blob: e700da6ea1d2462265d6d407ee9f6120d1dd63ee [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.kumarcec0cb72022-09-06 11:47:18 +00004# Modifications Copyright (C) 2022 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>
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000121
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000122 parameters:
123 dataspaceNameInQuery:
124 name: dataspace-name
125 in: query
126 description: dataspace-name
127 required: true
128 schema:
129 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000130 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000131 dataspaceNameInPath:
132 name: dataspace-name
133 in: path
134 description: dataspace-name
135 required: true
136 schema:
137 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000138 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000139 anchorNameInPath:
140 name: anchor-name
141 in: path
142 description: anchor-name
143 required: true
144 schema:
145 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000146 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000147 schemaSetNameInQuery:
148 name: schema-set-name
149 in: query
150 description: schema-set-name
151 required: true
152 schema:
153 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000154 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000155 schemaSetNameInPath:
156 name: schema-set-name
157 in: path
158 description: schema-set-name
159 required: true
160 schema:
161 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000162 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000163 anchorNameInQuery:
164 name: anchor-name
165 in: query
166 description: anchor-name
167 required: true
168 schema:
169 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000170 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200171 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200172 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200173 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000174 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
Ruslan Kashapov20983922021-02-01 10:47:25 +0200175 required: false
176 schema:
177 type: string
178 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000179 examples:
180 container xpath:
181 value: /shops/bookstore
182 list attributes xpath:
183 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300184 requiredXpathInQuery:
185 name: xpath
186 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000187 description: For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300188 required: true
189 schema:
190 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000191 examples:
192 container xpath:
193 value: /shops/bookstore
194 list attributes xpath:
195 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000196 cpsPathInQuery:
197 name: cps-path
198 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000199 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 +0000200 required: false
201 schema:
202 type: string
203 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000204 examples:
205 container cps path:
206 value: //bookstore
207 list attributes cps path:
208 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200209 includeDescendantsOptionInQuery:
210 name: include-descendants
211 in: query
212 description: include-descendants
213 required: false
214 schema:
215 type: boolean
216 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000217 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100218 observedTimestampInQuery:
219 name: observed-timestamp
220 in: query
221 description: observed-timestamp
222 required: false
223 schema:
224 type: string
225 example: '2021-03-21T00:10:34.030-0100'
rajesh.kumar897686f2022-12-14 08:13:29 +0000226 apiVersionInPath:
227 name: apiVersion
228 in: path
229 description: apiVersion
230 required: true
231 schema:
232 type: string
233 enum: [v1, v2]
234 default: v2
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000235 contentTypeHeader:
236 name: Content-Type
237 in: header
238 description: Content type header
239 schema:
240 type: string
241 example: 'application/json'
242 required: true
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000243
244 responses:
245 NotFound:
246 description: The specified resource was not found
247 content:
248 application/json:
249 schema:
250 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000251 example:
252 status: 404
253 message: Resource Not Found
254 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000255 Unauthorized:
256 description: Unauthorized
257 content:
258 application/json:
259 schema:
260 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000261 example:
262 status: 401
263 message: Unauthorized request
264 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000265 Forbidden:
266 description: Forbidden
267 content:
268 application/json:
269 schema:
270 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000271 example:
272 status: 403
273 message: Request Forbidden
274 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000275 BadRequest:
276 description: Bad Request
277 content:
278 application/json:
279 schema:
280 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000281 example:
282 status: 400
283 message: Bad Request
284 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200285 Conflict:
286 description: Conflict
287 content:
288 application/json:
289 schema:
290 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000291 example:
292 status: 409
293 message: Conflicting request
294 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000295 Ok:
296 description: OK
297 content:
298 application/json:
299 schema:
300 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000301 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000302 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000303 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000304 Created:
305 description: Created
306 content:
307 text/plain:
308 schema:
309 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000310 example: my-resource
rajesh.kumar897686f2022-12-14 08:13:29 +0000311 CreatedV2:
312 description: Created without response body
JosephKeenan909a8502022-01-28 10:02:24 +0000313 InternalServerError:
314 description: Internal Server Error
315 content:
316 application/json:
317 schema:
318 $ref: "#/components/schemas/ErrorMessage"
319 example:
320 status: 500
321 message: Internal Server Error
322 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000323 NoContent:
324 description: No Content
325 content: {}