blob: 5f31569c9a747efd6990f7dd491c98d3aa540145 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Bell Canada.
JosephKeenan909a8502022-01-28 10:02:24 +00003# Modifications Copyright (C) 2021-2022 Nordix Foundation
shivasubedi8df61a92021-06-16 14:43:18 +01004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040016#
17# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010018# ============LICENSE_END=========================================================
19
puthuparambil.aditya001e7732021-01-13 12:06:20 +000020components:
21 schemas:
JosephKeenanc6865f32021-06-08 13:16:37 +010022
23 AnchorDetails:
24 type: object
25 title: Anchor details by anchor Name
26 properties:
27 name:
28 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000029 example: my-anchor
JosephKeenanc6865f32021-06-08 13:16:37 +010030 dataspaceName:
31 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000032 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010033 schemaSetName:
34 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000035 example: my-schema-set
JosephKeenanc6865f32021-06-08 13:16:37 +010036
puthuparambil.aditya001e7732021-01-13 12:06:20 +000037 ErrorMessage:
38 type: object
39 title: Error
40 properties:
41 status:
42 type: string
43 message:
44 type: string
45 details:
46 type: string
Rishi.Chail6d13f162021-01-26 05:58:39 +000047
puthuparambil.aditya001e7732021-01-13 12:06:20 +000048 MultipartFile:
Renu Kumari4d520012021-08-30 11:50:43 -040049 type: object
puthuparambil.aditya001e7732021-01-13 12:06:20 +000050 required:
51 - file
52 properties:
Renu Kumari4d520012021-08-30 11:50:43 -040053 file:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000054 type: string
55 description: multipartFile
56 format: binary
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000057 example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000058
JosephKeenanc6865f32021-06-08 13:16:37 +010059 ModuleReferences:
60 type: object
61 title: Module reference object
62 properties:
63 name:
64 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000065 example: my-module-reference-name
JosephKeenanc6865f32021-06-08 13:16:37 +010066 namespace:
67 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000068 example: my-module-reference-namespace
JosephKeenanc6865f32021-06-08 13:16:37 +010069 revision:
70 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000071 example: my-module-reference-revision
JosephKeenanc6865f32021-06-08 13:16:37 +010072
73 SchemaSetDetails:
74 type: object
75 title: Schema set details by dataspace and schemasetName
76 properties:
77 dataspaceName:
78 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000079 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010080 moduleReferences:
81 type: array
82 items:
83 $ref: '#/components/schemas/ModuleReferences'
84 name:
85 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000086 example: my-schema-set
87
88 examples:
89 dataSampleRequest:
90 value:
91 test:bookstore:
92 bookstore-name: Chapters
93 categories:
94 - code: 01
95 name: SciFi
96 - code: 02
97 name: kids
98
99 dataSampleResponse:
100 summary: The data node returned does not include the root node. This is being investigated as a part of CPS-461
101 value:
102 bookstore-name: Chapters
103 categories:
104 - code: 01
105 name: SciFi
106 - code: 02
107 name: kids
JosephKeenanc6865f32021-06-08 13:16:37 +0100108
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000109 parameters:
110 dataspaceNameInQuery:
111 name: dataspace-name
112 in: query
113 description: dataspace-name
114 required: true
115 schema:
116 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000117 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000118 dataspaceNameInPath:
119 name: dataspace-name
120 in: path
121 description: dataspace-name
122 required: true
123 schema:
124 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000125 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000126 anchorNameInPath:
127 name: anchor-name
128 in: path
129 description: anchor-name
130 required: true
131 schema:
132 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000133 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000134 schemaSetNameInQuery:
135 name: schema-set-name
136 in: query
137 description: schema-set-name
138 required: true
139 schema:
140 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000141 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000142 schemaSetNameInPath:
143 name: schema-set-name
144 in: path
145 description: schema-set-name
146 required: true
147 schema:
148 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000149 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000150 anchorNameInQuery:
151 name: anchor-name
152 in: query
153 description: anchor-name
154 required: true
155 schema:
156 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000157 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200158 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200159 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200160 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000161 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 +0200162 required: false
163 schema:
164 type: string
165 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000166 examples:
167 container xpath:
168 value: /shops/bookstore
169 list attributes xpath:
170 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300171 requiredXpathInQuery:
172 name: xpath
173 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 Kashapov0905ac12021-05-05 13:11:50 +0300175 required: true
176 schema:
177 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000178 examples:
179 container xpath:
180 value: /shops/bookstore
181 list attributes xpath:
182 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000183 cpsPathInQuery:
184 name: cps-path
185 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000186 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 +0000187 required: false
188 schema:
189 type: string
190 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000191 examples:
192 container cps path:
193 value: //bookstore
194 list attributes cps path:
195 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200196 includeDescendantsOptionInQuery:
197 name: include-descendants
198 in: query
199 description: include-descendants
200 required: false
201 schema:
202 type: boolean
203 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000204 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100205 observedTimestampInQuery:
206 name: observed-timestamp
207 in: query
208 description: observed-timestamp
209 required: false
210 schema:
211 type: string
212 example: '2021-03-21T00:10:34.030-0100'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000213
214 responses:
215 NotFound:
216 description: The specified resource was not found
217 content:
218 application/json:
219 schema:
220 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000221 example:
222 status: 404
223 message: Resource Not Found
224 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000225 Unauthorized:
226 description: Unauthorized
227 content:
228 application/json:
229 schema:
230 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000231 example:
232 status: 401
233 message: Unauthorized request
234 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000235 Forbidden:
236 description: Forbidden
237 content:
238 application/json:
239 schema:
240 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000241 example:
242 status: 403
243 message: Request Forbidden
244 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000245 BadRequest:
246 description: Bad Request
247 content:
248 application/json:
249 schema:
250 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000251 example:
252 status: 400
253 message: Bad Request
254 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200255 Conflict:
256 description: Conflict
257 content:
258 application/json:
259 schema:
260 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000261 example:
262 status: 409
263 message: Conflicting request
264 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000265 Ok:
266 description: OK
267 content:
268 application/json:
269 schema:
270 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000271 examples:
272 dataSampleResponse:
273 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000274 Created:
275 description: Created
276 content:
277 text/plain:
278 schema:
279 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000280 example: my-resource
JosephKeenan909a8502022-01-28 10:02:24 +0000281 InternalServerError:
282 description: Internal Server Error
283 content:
284 application/json:
285 schema:
286 $ref: "#/components/schemas/ErrorMessage"
287 example:
288 status: 500
289 message: Internal Server Error
290 details: Internal Server Error occurred
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000291 NoContent:
292 description: No Content
293 content: {}