blob: da1878fea86b85dc25faca8d2a971b8634a0e5e6 [file] [log] [blame]
tragait34a94b92021-03-30 12:02:27 +01001# ============LICENSE_START=======================================================
lukegleeson15b93e72021-07-07 15:25:30 +01002# Copyright (C) 2021 Nordix Foundation
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +03003# Modifications Copyright (C) 2021 Pantheon.tech
tragait34a94b92021-03-30 12:02:27 +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
lukegleeson15b93e72021-07-07 15:25:30 +010010#
tragait34a94b92021-03-30 12:02:27 +010011# 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.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020020components:
21 schemas:
niamhcore66017b42021-10-19 11:07:02 +010022 # Common Schemas
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020023 ErrorMessage:
24 type: object
25 title: Error
26 properties:
27 status:
28 type: string
29 message:
30 type: string
31 details:
32 type: string
DylanB95EST4f4178c2021-07-02 13:30:42 +010033
niamhcore66017b42021-10-19 11:07:02 +010034 # Request Schemas
DylanB95EST4f4178c2021-07-02 13:30:42 +010035 RestDmiPluginRegistration:
36 type: object
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020037 properties:
DylanB95EST4f4178c2021-07-02 13:30:42 +010038 dmiPlugin:
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020039 type: string
DylanB95EST4f4178c2021-07-02 13:30:42 +010040 example: onap-dmi-plugin
JosephKeenan20b4f9c2021-11-23 12:18:28 +000041 dmiDataPlugin:
42 type: string
43 example: onap-dmi-data-plugin
44 dmiModelPlugin:
45 type: string
46 example: onap-dmi-model-plugin
DylanB95EST4f4178c2021-07-02 13:30:42 +010047 createdCmHandles:
48 type: array
49 items:
50 $ref: '#/components/schemas/RestCmHandle'
DylanB95EST31facc82021-08-18 17:12:25 +010051 updatedCmHandles:
52 type: array
53 items:
54 $ref: '#/components/schemas/RestCmHandle'
DylanB95ESTe999b022021-08-24 16:56:40 +010055 removedCmHandles:
56 type: array
57 items:
58 type: string
DylanB95EST4f4178c2021-07-02 13:30:42 +010059
60 RestCmHandle:
61 required:
62 - cmHandle
63 type: object
64 properties:
65 cmHandle:
66 type: string
67 example: cmHandle123
68 cmHandleProperties:
69 $ref: '#/components/schemas/RestCmHandleAdditionalProperties'
70 RestCmHandleAdditionalProperties:
71 type: object
72 additionalProperties:
73 type: string
74 example: system-001
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020075
niamhcore66017b42021-10-19 11:07:02 +010076 Conditions:
77 type: object
78 properties:
79 conditions:
80 $ref: '#/components/schemas/ConditionsData'
81 ConditionsData:
82 type: array
83 items:
84 type: object
85 $ref: '#/components/schemas/ConditionProperties'
86 ConditionProperties:
87 properties:
88 name:
89 type: string
90 example: hasAllModules
91 conditionParameters:
niamhcoreb0d93072021-10-28 13:39:24 +010092 $ref: '#/components/schemas/ModuleNamesAsJsonArray'
93 ModuleNamesAsJsonArray:
niamhcore66017b42021-10-19 11:07:02 +010094 type: array
95 items:
96 type: object
niamhcoreb0d93072021-10-28 13:39:24 +010097 $ref: '#/components/schemas/ModuleNameAsJsonObject'
98 ModuleNameAsJsonObject:
niamhcore66017b42021-10-19 11:07:02 +010099 properties:
100 moduleName:
101 type: string
102 example: someModuleName
103
104 #Response Schemas
105 CmHandles:
106 type: object
107 properties:
108 cmHandles:
109 $ref: '#/components/schemas/CmHandleProperties'
110 CmHandleProperties:
111 type: array
112 items:
113 type: object
114 $ref: '#/components/schemas/CmHandleProperty'
115 CmHandleProperty:
116 properties:
117 cmHandleId:
118 type: string
119 example: someCmHandleId
120
Ruslan Kashapov9f52f602021-01-22 12:53:01 +0200121 parameters:
Hanif Kukkalli83e318f2021-02-23 12:26:39 +0100122 cmHandleInPath:
123 name: cm-handle
124 in: path
tragait34a94b92021-03-30 12:02:27 +0100125 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
Hanif Kukkalli83e318f2021-02-23 12:26:39 +0100126 required: true
127 schema:
128 type: string
129 xpathInQuery:
130 name: xpath
131 in: query
132 description: xpath
133 required: false
134 schema:
135 type: string
136 default: /
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300137 requiredXpathInQuery:
138 name: xpath
139 in: query
140 description: xpath
141 required: true
142 schema:
143 type: string
Hanif Kukkalli83e318f2021-02-23 12:26:39 +0100144 includeDescendantsOptionInQuery:
145 name: include-descendants
146 in: query
147 description: include-descendants
148 required: false
149 schema:
150 type: boolean
151 default: false
niamhcoreb5d573b2021-02-26 10:13:48 +0000152 cpsPathInQuery:
153 name: cps-path
154 in: query
155 description: cps-path
156 required: false
157 schema:
158 type: string
159 default: /
niamhcorefd2e6dd2021-09-29 16:43:35 +0100160 resourceIdentifierInQuery:
tragaitc3285512021-08-16 15:12:36 +0100161 name: resourceIdentifier
niamhcorefd2e6dd2021-09-29 16:43:35 +0100162 in: query
163 description: The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.
tragaitc3285512021-08-16 15:12:36 +0100164 required: true
niamhcorefd2e6dd2021-09-29 16:43:35 +0100165 allowReserved: true
tragaitc3285512021-08-16 15:12:36 +0100166 schema:
167 type: string
niamhcorefd2e6dd2021-09-29 16:43:35 +0100168 examples:
169 sample1:
170 value:
171 resourceIdentifier: \parent\child
172 sample2:
173 value:
174 resourceIdentifier: \parent\listElement[key=value]
175 sample3:
176 value:
177 resourceIdentifier: \parent\listElement[key=value]\grandChild
178 sample4:
179 value:
180 resourceIdentifier: parent=1,child=abc
tragaitc3285512021-08-16 15:12:36 +0100181 acceptParamInHeader:
tragaitc584bf22021-08-20 15:45:58 +0100182 name: Accept
tragaitc3285512021-08-16 15:12:36 +0100183 in: header
184 required: false
185 description: Accept parameter for response, if accept parameter is null, that means client can accept any format.
186 schema:
187 type: string
188 enum: [ application/json, application/yang-data+json ]
tragaitabdff1b2021-10-06 11:04:18 +0100189 optionsParamInQuery:
190 name: options
tragaitc3285512021-08-16 15:12:36 +0100191 in: query
tragaitabdff1b2021-10-06 11:04:18 +0100192 description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'.
tragaitc3285512021-08-16 15:12:36 +0100193 required: false
194 schema:
195 type: string
tragaitabdff1b2021-10-06 11:04:18 +0100196 allowReserved: true
197 examples:
198 sample1:
199 value:
200 options: (key1=value1,key2=value2)
201 sample2:
202 value:
203 options: (key1=value1,key2=value1/value2)
204 sample3:
205 value:
206 options: (key1=10,key2=value2,key3=[val31;val32])
tragaitc584bf22021-08-20 15:45:58 +0100207 contentParamInHeader:
208 name: Content-Type
209 in: header
210 required: false
211 description: Content parameter for request, if content parameter is null, default value is application/json.
212 schema:
213 type: string
214 default: application/json
niamhcoreb5d573b2021-02-26 10:13:48 +0000215
Ruslan Kashapov9f52f602021-01-22 12:53:01 +0200216
217 responses:
218 NotFound:
219 description: The specified resource was not found
220 content:
221 application/json:
222 schema:
223 $ref: '#/components/schemas/ErrorMessage'
224 Unauthorized:
225 description: Unauthorized
226 content:
227 application/json:
228 schema:
229 $ref: '#/components/schemas/ErrorMessage'
230 Forbidden:
231 description: Forbidden
232 content:
233 application/json:
234 schema:
235 $ref: '#/components/schemas/ErrorMessage'
236 BadRequest:
237 description: Bad Request
238 content:
239 application/json:
240 schema:
241 $ref: '#/components/schemas/ErrorMessage'
242 Conflict:
243 description: Conflict
244 content:
245 application/json:
246 schema:
247 $ref: '#/components/schemas/ErrorMessage'
Hanif Kukkalli83e318f2021-02-23 12:26:39 +0100248 NotImplemented:
249 description: The given path has not been implemented
250 content:
251 application/json:
252 schema:
253 $ref: '#/components/schemas/ErrorMessage'
Ruslan Kashapov9f52f602021-01-22 12:53:01 +0200254 Ok:
255 description: OK
256 content:
257 application/json:
258 schema:
259 type: object
260 Created:
261 description: Created
DylanB95EST4f4178c2021-07-02 13:30:42 +0100262 content: {}
Ruslan Kashapov9f52f602021-01-22 12:53:01 +0200263 NoContent:
264 description: No Content
265 content: {}