tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
lukegleeson | 15b93e7 | 2021-07-07 15:25:30 +0100 | [diff] [blame] | 2 | # Copyright (C) 2021 Nordix Foundation |
Ruslan Kashapov | 1baf48d | 2021-05-07 10:46:27 +0300 | [diff] [blame] | 3 | # Modifications Copyright (C) 2021 Pantheon.tech |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 4 | # ================================================================================ |
| 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 |
lukegleeson | 15b93e7 | 2021-07-07 15:25:30 +0100 | [diff] [blame] | 10 | # |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 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. |
| 16 | # |
| 17 | # SPDX-License-Identifier: Apache-2.0 |
| 18 | # ============LICENSE_END========================================================= |
| 19 | |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 20 | components: |
| 21 | schemas: |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 22 | # Common Schemas |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 23 | ErrorMessage: |
| 24 | type: object |
| 25 | title: Error |
| 26 | properties: |
| 27 | status: |
| 28 | type: string |
| 29 | message: |
| 30 | type: string |
| 31 | details: |
| 32 | type: string |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 33 | |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 34 | # Request Schemas |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 35 | RestDmiPluginRegistration: |
| 36 | type: object |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 37 | properties: |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 38 | dmiPlugin: |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 39 | type: string |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 40 | example: onap-dmi-plugin |
JosephKeenan | 20b4f9c | 2021-11-23 12:18:28 +0000 | [diff] [blame^] | 41 | dmiDataPlugin: |
| 42 | type: string |
| 43 | example: onap-dmi-data-plugin |
| 44 | dmiModelPlugin: |
| 45 | type: string |
| 46 | example: onap-dmi-model-plugin |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 47 | createdCmHandles: |
| 48 | type: array |
| 49 | items: |
| 50 | $ref: '#/components/schemas/RestCmHandle' |
DylanB95EST | 31facc8 | 2021-08-18 17:12:25 +0100 | [diff] [blame] | 51 | updatedCmHandles: |
| 52 | type: array |
| 53 | items: |
| 54 | $ref: '#/components/schemas/RestCmHandle' |
DylanB95EST | e999b02 | 2021-08-24 16:56:40 +0100 | [diff] [blame] | 55 | removedCmHandles: |
| 56 | type: array |
| 57 | items: |
| 58 | type: string |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 59 | |
| 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 Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 75 | |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 76 | 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: |
niamhcore | b0d9307 | 2021-10-28 13:39:24 +0100 | [diff] [blame] | 92 | $ref: '#/components/schemas/ModuleNamesAsJsonArray' |
| 93 | ModuleNamesAsJsonArray: |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 94 | type: array |
| 95 | items: |
| 96 | type: object |
niamhcore | b0d9307 | 2021-10-28 13:39:24 +0100 | [diff] [blame] | 97 | $ref: '#/components/schemas/ModuleNameAsJsonObject' |
| 98 | ModuleNameAsJsonObject: |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 99 | 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 Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 121 | parameters: |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 122 | cmHandleInPath: |
| 123 | name: cm-handle |
| 124 | in: path |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 125 | description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 126 | 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 Kashapov | 1baf48d | 2021-05-07 10:46:27 +0300 | [diff] [blame] | 137 | requiredXpathInQuery: |
| 138 | name: xpath |
| 139 | in: query |
| 140 | description: xpath |
| 141 | required: true |
| 142 | schema: |
| 143 | type: string |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 144 | includeDescendantsOptionInQuery: |
| 145 | name: include-descendants |
| 146 | in: query |
| 147 | description: include-descendants |
| 148 | required: false |
| 149 | schema: |
| 150 | type: boolean |
| 151 | default: false |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 152 | cpsPathInQuery: |
| 153 | name: cps-path |
| 154 | in: query |
| 155 | description: cps-path |
| 156 | required: false |
| 157 | schema: |
| 158 | type: string |
| 159 | default: / |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 160 | resourceIdentifierInQuery: |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 161 | name: resourceIdentifier |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 162 | 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. |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 164 | required: true |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 165 | allowReserved: true |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 166 | schema: |
| 167 | type: string |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 168 | 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 |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 181 | acceptParamInHeader: |
tragait | c584bf2 | 2021-08-20 15:45:58 +0100 | [diff] [blame] | 182 | name: Accept |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 183 | 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 ] |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 189 | optionsParamInQuery: |
| 190 | name: options |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 191 | in: query |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 192 | description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'. |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 193 | required: false |
| 194 | schema: |
| 195 | type: string |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 196 | 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]) |
tragait | c584bf2 | 2021-08-20 15:45:58 +0100 | [diff] [blame] | 207 | 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 |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 215 | |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 216 | |
| 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 Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 248 | NotImplemented: |
| 249 | description: The given path has not been implemented |
| 250 | content: |
| 251 | application/json: |
| 252 | schema: |
| 253 | $ref: '#/components/schemas/ErrorMessage' |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 254 | Ok: |
| 255 | description: OK |
| 256 | content: |
| 257 | application/json: |
| 258 | schema: |
| 259 | type: object |
| 260 | Created: |
| 261 | description: Created |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 262 | content: {} |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 263 | NoContent: |
| 264 | description: No Content |
| 265 | content: {} |