blob: fb0947e54ac9dfbed525f372a752d6147766cce4 [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.
shivasubedi8df61a92021-06-16 14:43:18 +01005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040017#
18# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010019# ============LICENSE_END=========================================================
20
puthuparambil.aditya001e7732021-01-13 12:06:20 +000021components:
22 schemas:
JosephKeenanc6865f32021-06-08 13:16:37 +010023
24 AnchorDetails:
25 type: object
26 title: Anchor details by anchor Name
27 properties:
28 name:
29 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000030 example: my-anchor
JosephKeenanc6865f32021-06-08 13:16:37 +010031 dataspaceName:
32 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000033 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010034 schemaSetName:
35 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000036 example: my-schema-set
JosephKeenanc6865f32021-06-08 13:16:37 +010037
rajesh.kumarcec0cb72022-09-06 11:47:18 +000038 DataspaceDetails:
39 type: object
40 title: Dataspace details by dataspace Name
41 properties:
42 name:
43 type: string
44 example: my-dataspace
45
puthuparambil.aditya001e7732021-01-13 12:06:20 +000046 ErrorMessage:
47 type: object
48 title: Error
49 properties:
50 status:
51 type: string
52 message:
53 type: string
54 details:
55 type: string
Rishi.Chail6d13f162021-01-26 05:58:39 +000056
puthuparambil.aditya001e7732021-01-13 12:06:20 +000057 MultipartFile:
Renu Kumari4d520012021-08-30 11:50:43 -040058 type: object
puthuparambil.aditya001e7732021-01-13 12:06:20 +000059 required:
60 - file
61 properties:
Renu Kumari4d520012021-08-30 11:50:43 -040062 file:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000063 type: string
64 description: multipartFile
65 format: binary
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000066 example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000067
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
109
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000110 parameters:
111 dataspaceNameInQuery:
112 name: dataspace-name
113 in: query
114 description: dataspace-name
115 required: true
116 schema:
117 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000118 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000119 dataspaceNameInPath:
120 name: dataspace-name
121 in: path
122 description: dataspace-name
123 required: true
124 schema:
125 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000126 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000127 anchorNameInPath:
128 name: anchor-name
129 in: path
130 description: anchor-name
131 required: true
132 schema:
133 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000134 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000135 schemaSetNameInQuery:
136 name: schema-set-name
137 in: query
138 description: schema-set-name
139 required: true
140 schema:
141 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000142 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000143 schemaSetNameInPath:
144 name: schema-set-name
145 in: path
146 description: schema-set-name
147 required: true
148 schema:
149 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000150 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000151 anchorNameInQuery:
152 name: anchor-name
153 in: query
154 description: anchor-name
155 required: true
156 schema:
157 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000158 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200159 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200160 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200161 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000162 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 +0200163 required: false
164 schema:
165 type: string
166 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000167 examples:
168 container xpath:
169 value: /shops/bookstore
170 list attributes xpath:
171 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300172 requiredXpathInQuery:
173 name: xpath
174 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000175 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 +0300176 required: true
177 schema:
178 type: string
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]
niamhcore53f07ac2021-02-19 13:14:40 +0000184 cpsPathInQuery:
185 name: cps-path
186 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000187 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 +0000188 required: false
189 schema:
190 type: string
191 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000192 examples:
193 container cps path:
194 value: //bookstore
195 list attributes cps path:
196 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200197 includeDescendantsOptionInQuery:
198 name: include-descendants
199 in: query
200 description: include-descendants
201 required: false
202 schema:
203 type: boolean
204 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000205 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100206 observedTimestampInQuery:
207 name: observed-timestamp
208 in: query
209 description: observed-timestamp
210 required: false
211 schema:
212 type: string
213 example: '2021-03-21T00:10:34.030-0100'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000214
215 responses:
216 NotFound:
217 description: The specified resource was not found
218 content:
219 application/json:
220 schema:
221 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000222 example:
223 status: 404
224 message: Resource Not Found
225 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000226 Unauthorized:
227 description: Unauthorized
228 content:
229 application/json:
230 schema:
231 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000232 example:
233 status: 401
234 message: Unauthorized request
235 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000236 Forbidden:
237 description: Forbidden
238 content:
239 application/json:
240 schema:
241 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000242 example:
243 status: 403
244 message: Request Forbidden
245 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000246 BadRequest:
247 description: Bad Request
248 content:
249 application/json:
250 schema:
251 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000252 example:
253 status: 400
254 message: Bad Request
255 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200256 Conflict:
257 description: Conflict
258 content:
259 application/json:
260 schema:
261 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000262 example:
263 status: 409
264 message: Conflicting request
265 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000266 Ok:
267 description: OK
268 content:
269 application/json:
270 schema:
271 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000272 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000273 dataSample:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000274 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000275 Created:
276 description: Created
277 content:
278 text/plain:
279 schema:
280 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000281 example: my-resource
JosephKeenan909a8502022-01-28 10:02:24 +0000282 InternalServerError:
283 description: Internal Server Error
284 content:
285 application/json:
286 schema:
287 $ref: "#/components/schemas/ErrorMessage"
288 example:
289 status: 500
290 message: Internal Server Error
291 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000292 NoContent:
293 description: No Content
294 content: {}