blob: ff2816af6dfbc8ab944e377d671408e51c381b6d [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Bell Canada.
3# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040015#
16# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010017# ============LICENSE_END=========================================================
18
puthuparambil.aditya001e7732021-01-13 12:06:20 +000019components:
20 schemas:
JosephKeenanc6865f32021-06-08 13:16:37 +010021
22 AnchorDetails:
23 type: object
24 title: Anchor details by anchor Name
25 properties:
26 name:
27 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000028 example: my-anchor
JosephKeenanc6865f32021-06-08 13:16:37 +010029 dataspaceName:
30 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000031 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010032 schemaSetName:
33 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000034 example: my-schema-set
JosephKeenanc6865f32021-06-08 13:16:37 +010035
puthuparambil.aditya001e7732021-01-13 12:06:20 +000036 ErrorMessage:
37 type: object
38 title: Error
39 properties:
40 status:
41 type: string
42 message:
43 type: string
44 details:
45 type: string
Rishi.Chail6d13f162021-01-26 05:58:39 +000046
puthuparambil.aditya001e7732021-01-13 12:06:20 +000047 MultipartFile:
Renu Kumari4d520012021-08-30 11:50:43 -040048 type: object
puthuparambil.aditya001e7732021-01-13 12:06:20 +000049 required:
50 - file
51 properties:
Renu Kumari4d520012021-08-30 11:50:43 -040052 file:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000053 type: string
54 description: multipartFile
55 format: binary
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000056 example: 'https://github.com/onap/cps/blob/master/cps-service/src/test/resources/bookstore.yang'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000057
JosephKeenanc6865f32021-06-08 13:16:37 +010058 ModuleReferences:
59 type: object
60 title: Module reference object
61 properties:
62 name:
63 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000064 example: my-module-reference-name
JosephKeenanc6865f32021-06-08 13:16:37 +010065 namespace:
66 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000067 example: my-module-reference-namespace
JosephKeenanc6865f32021-06-08 13:16:37 +010068 revision:
69 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000070 example: my-module-reference-revision
JosephKeenanc6865f32021-06-08 13:16:37 +010071
72 SchemaSetDetails:
73 type: object
74 title: Schema set details by dataspace and schemasetName
75 properties:
76 dataspaceName:
77 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000078 example: my-dataspace
JosephKeenanc6865f32021-06-08 13:16:37 +010079 moduleReferences:
80 type: array
81 items:
82 $ref: '#/components/schemas/ModuleReferences'
83 name:
84 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000085 example: my-schema-set
86
87 examples:
88 dataSampleRequest:
89 value:
90 test:bookstore:
91 bookstore-name: Chapters
92 categories:
93 - code: 01
94 name: SciFi
95 - code: 02
96 name: kids
97
98 dataSampleResponse:
99 summary: The data node returned does not include the root node. This is being investigated as a part of CPS-461
100 value:
101 bookstore-name: Chapters
102 categories:
103 - code: 01
104 name: SciFi
105 - code: 02
106 name: kids
JosephKeenanc6865f32021-06-08 13:16:37 +0100107
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000108 parameters:
109 dataspaceNameInQuery:
110 name: dataspace-name
111 in: query
112 description: dataspace-name
113 required: true
114 schema:
115 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000116 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000117 dataspaceNameInPath:
118 name: dataspace-name
119 in: path
120 description: dataspace-name
121 required: true
122 schema:
123 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000124 example: my-dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000125 anchorNameInPath:
126 name: anchor-name
127 in: path
128 description: anchor-name
129 required: true
130 schema:
131 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000132 example: my-anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000133 schemaSetNameInQuery:
134 name: schema-set-name
135 in: query
136 description: schema-set-name
137 required: true
138 schema:
139 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000140 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000141 schemaSetNameInPath:
142 name: schema-set-name
143 in: path
144 description: schema-set-name
145 required: true
146 schema:
147 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000148 example: my-schema-set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000149 anchorNameInQuery:
150 name: anchor-name
151 in: query
152 description: anchor-name
153 required: true
154 schema:
155 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000156 example: my-anchor
Ruslan Kashapov20983922021-02-01 10:47:25 +0200157 xpathInQuery:
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200158 name: xpath
Ruslan Kashapov20983922021-02-01 10:47:25 +0200159 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000160 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 +0200161 required: false
162 schema:
163 type: string
164 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000165 examples:
166 container xpath:
167 value: /shops/bookstore
168 list attributes xpath:
169 value: /shops/bookstore/categories[@code=1]
Ruslan Kashapov0905ac12021-05-05 13:11:50 +0300170 requiredXpathInQuery:
171 name: xpath
172 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000173 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 +0300174 required: true
175 schema:
176 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000177 examples:
178 container xpath:
179 value: /shops/bookstore
180 list attributes xpath:
181 value: /shops/bookstore/categories[@code=1]
niamhcore53f07ac2021-02-19 13:14:40 +0000182 cpsPathInQuery:
183 name: cps-path
184 in: query
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000185 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 +0000186 required: false
187 schema:
188 type: string
189 default: /
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000190 examples:
191 container cps path:
192 value: //bookstore
193 list attributes cps path:
194 value: //categories[@code=1]
Ruslan Kashapov20983922021-02-01 10:47:25 +0200195 includeDescendantsOptionInQuery:
196 name: include-descendants
197 in: query
198 description: include-descendants
199 required: false
200 schema:
201 type: boolean
202 default: false
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000203 example: false
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100204 observedTimestampInQuery:
205 name: observed-timestamp
206 in: query
207 description: observed-timestamp
208 required: false
209 schema:
210 type: string
211 example: '2021-03-21T00:10:34.030-0100'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000212
213 responses:
214 NotFound:
215 description: The specified resource was not found
216 content:
217 application/json:
218 schema:
219 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000220 example:
221 status: 404
222 message: Resource Not Found
223 details: The requested resource is not found
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000224 Unauthorized:
225 description: Unauthorized
226 content:
227 application/json:
228 schema:
229 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000230 example:
231 status: 401
232 message: Unauthorized request
233 details: This request is unauthorized
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000234 Forbidden:
235 description: Forbidden
236 content:
237 application/json:
238 schema:
239 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000240 example:
241 status: 403
242 message: Request Forbidden
243 details: This request is forbidden
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000244 BadRequest:
245 description: Bad Request
246 content:
247 application/json:
248 schema:
249 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000250 example:
251 status: 400
252 message: Bad Request
253 details: The provided request is not valid
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200254 Conflict:
255 description: Conflict
256 content:
257 application/json:
258 schema:
259 $ref: '#/components/schemas/ErrorMessage'
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000260 example:
261 status: 409
262 message: Conflicting request
263 details: The request cannot be processed as the resource is in use.
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000264 Ok:
265 description: OK
266 content:
267 application/json:
268 schema:
269 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000270 examples:
271 dataSampleResponse:
272 value: ""
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000273 Created:
274 description: Created
275 content:
276 text/plain:
277 schema:
278 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000279 example: my-resource
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000280 NoContent:
281 description: No Content
282 content: {}