tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
halil.cakal | 04280e2 | 2024-01-23 10:05:36 +0000 | [diff] [blame] | 2 | # Copyright (C) 2021-2024 Nordix Foundation |
Ruslan Kashapov | 1baf48d | 2021-05-07 10:46:27 +0300 | [diff] [blame] | 3 | # Modifications Copyright (C) 2021 Pantheon.tech |
puthuparambil.aditya | d69742c | 2022-03-29 11:03:52 +0100 | [diff] [blame] | 4 | # Modifications Copyright (C) 2022 Bell Canada |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 5 | # ================================================================================ |
| 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 |
lukegleeson | 15b93e7 | 2021-07-07 15:25:30 +0100 | [diff] [blame] | 11 | # |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 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. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
| 20 | |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 21 | components: |
| 22 | schemas: |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 23 | # Common Schemas |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 24 | ErrorMessage: |
| 25 | type: object |
| 26 | title: Error |
| 27 | properties: |
| 28 | status: |
| 29 | type: string |
| 30 | message: |
| 31 | type: string |
| 32 | details: |
| 33 | type: string |
mpriyank | 93afc1e | 2022-03-28 15:47:47 +0530 | [diff] [blame] | 34 | # DMI Server Exception Schema |
| 35 | DmiErrorMessage: |
| 36 | title: DMI Error Message |
| 37 | type: object |
| 38 | properties: |
| 39 | message: |
| 40 | type: string |
egernug | 9426ae8 | 2023-06-21 11:16:02 +0100 | [diff] [blame] | 41 | example: 'Bad Gateway Error Message NCMP' |
mpriyank | 93afc1e | 2022-03-28 15:47:47 +0530 | [diff] [blame] | 42 | dmi-response: |
| 43 | type: object |
| 44 | properties: |
| 45 | http-code: |
| 46 | type: integer |
| 47 | example: 400 |
| 48 | body: |
| 49 | type: string |
| 50 | example: Bad Request |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 51 | # Request Schemas |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 52 | RestDmiPluginRegistration: |
| 53 | type: object |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 54 | properties: |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 55 | dmiPlugin: |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 56 | type: string |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 57 | example: my-dmi-plugin |
DylanB95EST | d042fcd | 2022-02-21 12:57:08 +0000 | [diff] [blame] | 58 | default: "" |
JosephKeenan | 20b4f9c | 2021-11-23 12:18:28 +0000 | [diff] [blame] | 59 | dmiDataPlugin: |
| 60 | type: string |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 61 | example: my-dmi-data-plugin |
DylanB95EST | d042fcd | 2022-02-21 12:57:08 +0000 | [diff] [blame] | 62 | default: "" |
JosephKeenan | 20b4f9c | 2021-11-23 12:18:28 +0000 | [diff] [blame] | 63 | dmiModelPlugin: |
| 64 | type: string |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 65 | example: my-dmi-model-plugin |
DylanB95EST | d042fcd | 2022-02-21 12:57:08 +0000 | [diff] [blame] | 66 | default: "" |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 67 | createdCmHandles: |
| 68 | type: array |
| 69 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 70 | $ref: '#/components/schemas/RestInputCmHandle' |
DylanB95EST | 31facc8 | 2021-08-18 17:12:25 +0100 | [diff] [blame] | 71 | updatedCmHandles: |
| 72 | type: array |
| 73 | items: |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 74 | $ref: '#/components/schemas/RestInputCmHandle' |
Renu Kumari | 2c96317 | 2022-03-10 16:02:55 -0500 | [diff] [blame] | 75 | example: |
| 76 | cmHandle: my-cm-handle |
| 77 | cmHandleProperties: |
| 78 | add-my-property: add-property |
| 79 | update-my-property: updated-property |
| 80 | delete-my-property: '~' |
| 81 | publicCmHandleProperties: |
| 82 | add-my-property: add-property |
| 83 | update-my-property: updated-property |
| 84 | delete-my-property: '~' |
DylanB95EST | e999b02 | 2021-08-24 16:56:40 +0100 | [diff] [blame] | 85 | removedCmHandles: |
| 86 | type: array |
| 87 | items: |
| 88 | type: string |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 89 | example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ] |
sourabh_sourabh | 55164b2 | 2023-09-26 12:11:42 +0100 | [diff] [blame] | 90 | upgradedCmHandles: |
| 91 | $ref: '#/components/schemas/UpgradedCmHandles' |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 92 | DmiPluginRegistrationErrorResponse: |
| 93 | type: object |
| 94 | properties: |
| 95 | failedCreatedCmHandles: |
| 96 | type: array |
| 97 | items: |
| 98 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 99 | failedUpdatedCmHandles: |
| 100 | type: array |
| 101 | items: |
| 102 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 103 | failedRemovedCmHandles: |
| 104 | type: array |
| 105 | items: |
| 106 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
sourabh_sourabh | 55164b2 | 2023-09-26 12:11:42 +0100 | [diff] [blame] | 107 | failedUpgradeCmHandles: |
| 108 | type: array |
| 109 | items: |
| 110 | $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse' |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 111 | CmHandlerRegistrationErrorResponse: |
| 112 | type: object |
| 113 | properties: |
| 114 | cmHandle: |
| 115 | type: string |
| 116 | example: my-cm-handle |
| 117 | errorCode: |
| 118 | type: string |
Renu Kumari | 952603c | 2022-04-18 12:39:33 -0400 | [diff] [blame] | 119 | example: '00' |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 120 | errorText: |
| 121 | type: string |
Renu Kumari | 952603c | 2022-04-18 12:39:33 -0400 | [diff] [blame] | 122 | example: 'Unknown error. <error-details>' |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 123 | |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 124 | RestInputCmHandle: |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 125 | required: |
| 126 | - cmHandle |
| 127 | type: object |
| 128 | properties: |
| 129 | cmHandle: |
| 130 | type: string |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 131 | example: my-cm-handle |
DylanB95EST | 4f4178c | 2021-07-02 13:30:42 +0100 | [diff] [blame] | 132 | cmHandleProperties: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 133 | $ref: '#/components/schemas/RestCmHandleProperties' |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 134 | publicCmHandleProperties: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 135 | $ref: '#/components/schemas/RestCmHandleProperties' |
leventecsanyi | 46782b7 | 2023-09-04 10:59:23 +0200 | [diff] [blame] | 136 | moduleSetTag: |
| 137 | type: string |
| 138 | example: "my-module-set-tag" |
seanbeirne | f41dd3b | 2023-10-17 11:03:16 +0100 | [diff] [blame] | 139 | trustLevel: |
| 140 | type: string |
| 141 | enum: [COMPLETE, NONE] |
| 142 | example: "COMPLETE" |
leventecsanyi | d8be9ef | 2023-12-07 16:17:12 +0100 | [diff] [blame] | 143 | alternateId: |
| 144 | type: string |
| 145 | example: "my-alternate-id" |
DylanB95EST | 63132ce | 2021-12-14 16:34:38 +0000 | [diff] [blame] | 146 | RestCmHandleProperties: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 147 | type: object |
| 148 | additionalProperties: |
| 149 | type: string |
| 150 | example: my-property |
sourabh_sourabh | 55164b2 | 2023-09-26 12:11:42 +0100 | [diff] [blame] | 151 | #Module upgrade schema |
| 152 | UpgradedCmHandles: |
| 153 | required: |
| 154 | - cmHandles |
| 155 | type: object |
| 156 | properties: |
| 157 | cmHandles: |
| 158 | type: array |
| 159 | items: |
| 160 | type: string |
| 161 | example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ] |
| 162 | moduleSetTag: |
| 163 | type: string |
sourabh_sourabh | 541ed45 | 2023-12-05 11:02:17 +0000 | [diff] [blame] | 164 | default: "" |
sourabh_sourabh | 55164b2 | 2023-09-26 12:11:42 +0100 | [diff] [blame] | 165 | example: 'my-module-set-tag' |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 166 | |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 167 | #Response Schemas |
lukegleeson | d5bda88 | 2022-03-02 14:32:47 +0000 | [diff] [blame] | 168 | RestModuleReference: |
puthuparambil.aditya | d000733 | 2021-12-08 18:53:39 +0000 | [diff] [blame] | 169 | type: object |
| 170 | title: Module reference details |
| 171 | properties: |
| 172 | moduleName: |
| 173 | type: string |
| 174 | example: my-module-name |
| 175 | revision: |
| 176 | type: string |
| 177 | example: my-module-revision |
| 178 | |
emaclee | e1f73e2 | 2022-06-17 17:42:56 +0100 | [diff] [blame] | 179 | RestModuleDefinition: |
| 180 | type: object |
| 181 | title: Module definitions |
| 182 | properties: |
| 183 | moduleName: |
| 184 | type: string |
| 185 | example: my-module-name |
| 186 | revision: |
| 187 | type: string |
| 188 | example: 2020-09-15 |
| 189 | content: |
| 190 | type: string |
| 191 | example: | |
| 192 | module stores { |
| 193 | yang-version 1.1; |
egernug | 9426ae8 | 2023-06-21 11:16:02 +0100 | [diff] [blame] | 194 | namespace 'org:onap:ccsdk:sample'; |
emaclee | e1f73e2 | 2022-06-17 17:42:56 +0100 | [diff] [blame] | 195 | prefix book-store; |
egernug | 9426ae8 | 2023-06-21 11:16:02 +0100 | [diff] [blame] | 196 | revision '2020-09-15' { |
emaclee | e1f73e2 | 2022-06-17 17:42:56 +0100 | [diff] [blame] | 197 | description |
egernug | 9426ae8 | 2023-06-21 11:16:02 +0100 | [diff] [blame] | 198 | 'Sample Model'; |
emaclee | e1f73e2 | 2022-06-17 17:42:56 +0100 | [diff] [blame] | 199 | } |
| 200 | } |
| 201 | |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 202 | CmHandleQueryParameters: |
JosephKeenan | deac477 | 2022-03-28 12:26:07 +0100 | [diff] [blame] | 203 | type: object |
| 204 | title: Cm Handle query parameters for executing cm handle search |
| 205 | properties: |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 206 | cmHandleQueryParameters: |
| 207 | type: array |
| 208 | items: |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 209 | $ref: '#/components/schemas/ConditionProperties' |
| 210 | conditions: |
| 211 | deprecated: true |
| 212 | type: array |
| 213 | items: |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 214 | $ref: '#/components/schemas/OldConditionProperties' |
| 215 | description: not necessary, it is just for backward compatibility |
lukegleeson | 82a550f | 2022-07-11 10:55:53 +0100 | [diff] [blame] | 216 | |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 217 | ConditionProperties: |
| 218 | properties: |
| 219 | conditionName: |
| 220 | type: string |
| 221 | conditionParameters: |
| 222 | type: array |
| 223 | items: |
| 224 | type: object |
| 225 | additionalProperties: |
| 226 | type: string |
| 227 | OldConditionProperties: |
| 228 | deprecated: true |
| 229 | properties: |
| 230 | name: |
| 231 | type: string |
| 232 | conditionParameters: |
| 233 | type: array |
| 234 | items: |
kissand | e9ed581 | 2022-05-12 15:59:18 +0200 | [diff] [blame] | 235 | $ref: '#/components/schemas/ModuleNameAsJsonObject' |
| 236 | ModuleNameAsJsonObject: |
| 237 | properties: |
| 238 | moduleName: |
| 239 | type: string |
| 240 | example: my-module |
JosephKeenan | deac477 | 2022-03-28 12:26:07 +0100 | [diff] [blame] | 241 | |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 242 | RestOutputCmHandle: |
| 243 | type: object |
| 244 | title: CM handle Details |
| 245 | properties: |
| 246 | cmHandle: |
| 247 | type: string |
| 248 | example: my-cm-handle1 |
| 249 | publicCmHandleProperties: |
| 250 | $ref: '#/components/schemas/CmHandlePublicProperties' |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 251 | state: |
lukegleeson | 78062a1 | 2022-06-02 10:56:43 +0100 | [diff] [blame] | 252 | $ref: '#/components/schemas/CmHandleCompositeState' |
emaclee | e24f5e8 | 2023-09-23 13:46:15 +0100 | [diff] [blame] | 253 | trustLevel: |
| 254 | $ref: '#/components/schemas/CmHandleTrustLevel' |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 255 | CmHandlePublicProperties: |
egernug | 477bd46 | 2023-09-21 17:51:21 +0100 | [diff] [blame] | 256 | type: object |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 257 | items: |
Toine Siebelink | ad9b701 | 2023-09-20 09:35:10 +0000 | [diff] [blame] | 258 | type: object |
| 259 | additionalProperties: |
| 260 | type: string |
egernug | 477bd46 | 2023-09-21 17:51:21 +0100 | [diff] [blame] | 261 | example: 'Book Type' |
lukegleeson | 78062a1 | 2022-06-02 10:56:43 +0100 | [diff] [blame] | 262 | CmHandleCompositeState: |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 263 | type: object |
| 264 | properties: |
| 265 | cmHandleState: |
| 266 | type: string |
| 267 | example: ADVISED |
| 268 | lockReason: |
| 269 | $ref: '#/components/schemas/lock-reason' |
| 270 | lastUpdateTime: |
| 271 | type: string |
| 272 | example: 2022-12-31T20:30:40.000+0000 |
| 273 | dataSyncEnabled: |
| 274 | type: boolean |
| 275 | example: false |
| 276 | dataSyncState: |
| 277 | $ref: '#/components/schemas/dataStores' |
emaclee | e24f5e8 | 2023-09-23 13:46:15 +0100 | [diff] [blame] | 278 | CmHandleTrustLevel: |
| 279 | type: string |
| 280 | description: Current trust level of the relevant CM handle ID. |
| 281 | example: COMPLETE |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 282 | |
| 283 | lock-reason: |
| 284 | type: object |
| 285 | properties: |
| 286 | reason: |
| 287 | type: string |
lukegleeson | 4e59684 | 2022-06-28 12:15:33 +0100 | [diff] [blame] | 288 | example: LOCKED_MISBEHAVING |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 289 | details: |
| 290 | type: string |
lukegleeson | 4e59684 | 2022-06-28 12:15:33 +0100 | [diff] [blame] | 291 | example: locked due to failure in module sync |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 292 | |
| 293 | dataStores: |
| 294 | type: object |
| 295 | properties: |
| 296 | operational: |
| 297 | $ref: '#/components/schemas/sync-state' |
| 298 | running: |
| 299 | $ref: '#/components/schemas/sync-state' |
| 300 | |
| 301 | sync-state: |
| 302 | type: object |
| 303 | properties: |
lukegleeson | 82a550f | 2022-07-11 10:55:53 +0100 | [diff] [blame] | 304 | syncState: |
mpriyank | 4cf4962 | 2022-05-20 15:25:15 +0100 | [diff] [blame] | 305 | type: string |
| 306 | example: NONE_REQUESTED |
| 307 | lastSyncTime: |
| 308 | type: string |
| 309 | example: 2022-12-31T20:30:40.000+0000 |
DylanB95EST | e557338 | 2022-01-27 17:12:52 +0000 | [diff] [blame] | 310 | |
lukegleeson | bed18fd | 2022-05-06 12:02:42 +0100 | [diff] [blame] | 311 | RestOutputCmHandlePublicProperties: |
| 312 | type: object |
| 313 | properties: |
| 314 | publicCmHandleProperties: |
| 315 | $ref: '#/components/schemas/CmHandlePublicProperties' |
| 316 | |
lukegleeson | 78062a1 | 2022-06-02 10:56:43 +0100 | [diff] [blame] | 317 | RestOutputCmHandleCompositeState: |
| 318 | type: object |
| 319 | properties: |
| 320 | state: |
| 321 | $ref: '#/components/schemas/CmHandleCompositeState' |
raviteja.karumuri | 977f7c3 | 2023-06-20 19:10:21 +0100 | [diff] [blame] | 322 | # Data Operation Request Schemas |
| 323 | DataOperationRequest: |
sourabh_sourabh | f232f30 | 2023-05-09 14:34:59 +0100 | [diff] [blame] | 324 | type: object |
raviteja.karumuri | 977f7c3 | 2023-06-20 19:10:21 +0100 | [diff] [blame] | 325 | title: execute data operation for given array of operations |
sourabh_sourabh | f232f30 | 2023-05-09 14:34:59 +0100 | [diff] [blame] | 326 | properties: |
| 327 | operations: |
| 328 | type: array |
| 329 | items: |
raviteja.karumuri | 977f7c3 | 2023-06-20 19:10:21 +0100 | [diff] [blame] | 330 | $ref: '#/components/schemas/DataOperationDefinition' |
| 331 | description: contains group of data operation requests |
| 332 | DataOperationDefinition: |
sourabh_sourabh | f232f30 | 2023-05-09 14:34:59 +0100 | [diff] [blame] | 333 | required: |
| 334 | - operation |
| 335 | - datastore |
| 336 | - operationId |
| 337 | properties: |
| 338 | operation: |
| 339 | type: string |
| 340 | example: 'read' |
| 341 | operationId: |
| 342 | type: string |
| 343 | example: '12' |
| 344 | datastore: |
| 345 | type: string |
| 346 | example: 'ncmp-datastore:passthrough-operational' |
| 347 | options: |
| 348 | type: string |
| 349 | example: '(fields=schemas/schema)' |
| 350 | resourceIdentifier: |
| 351 | type: string |
| 352 | example: 'parent/child' |
| 353 | targetIds: |
| 354 | type: array |
| 355 | items: |
| 356 | type: string |
egernug | 9426ae8 | 2023-06-21 11:16:02 +0100 | [diff] [blame] | 357 | example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ] |
lukegleeson | 78062a1 | 2022-06-02 10:56:43 +0100 | [diff] [blame] | 358 | |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 359 | examples: |
| 360 | dataSampleRequest: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 361 | summary: Sample request |
| 362 | description: Sample request body |
| 363 | value: |
| 364 | test:bookstore: |
| 365 | bookstore-name: Chapters |
| 366 | categories: |
| 367 | - code: '01' |
| 368 | name: SciFi |
| 369 | books: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 370 | - authors: |
| 371 | - Iain M. Banks |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 372 | - Ursula K. Le Guin |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 373 | - code: '02' |
| 374 | name: kids |
| 375 | books: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 376 | - authors: |
| 377 | - Philip Pullman |
| 378 | |
tragait | ecd7f5e | 2022-01-13 13:15:14 +0000 | [diff] [blame] | 379 | dataSamplePatchRequest: |
| 380 | summary: Sample patch request |
| 381 | description: Sample patch request body |
| 382 | value: |
| 383 | ietf-restconf:yang-patch: |
| 384 | patch-id: patch-1 |
| 385 | edit: |
| 386 | - edit-id: edit1 |
| 387 | operation: merge |
| 388 | target: / |
| 389 | value: |
| 390 | test:bookstore: |
| 391 | bookstore-name: Chapters |
| 392 | categories: |
| 393 | - code: '01' |
| 394 | name: Science |
| 395 | books: |
| 396 | - authors: |
| 397 | - Author1 |
| 398 | - Author2 |
| 399 | - code: '02' |
| 400 | name: Arts |
| 401 | books: |
| 402 | - authors: |
| 403 | - Author3 |
| 404 | - edit-id: edit2 |
| 405 | operation: merge |
| 406 | target: / |
| 407 | value: |
| 408 | test:bookstore: |
| 409 | bookstore-name: Novels |
| 410 | categories: |
| 411 | - code: '03' |
| 412 | name: History |
| 413 | books: |
| 414 | - authors: |
| 415 | - Iain M. Banks |
| 416 | - Ursula K. Le Guin |
| 417 | - code: '04' |
| 418 | name: Fiction |
| 419 | books: |
| 420 | - authors: |
| 421 | - Philip Pullman |
| 422 | |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 423 | dataSampleResponse: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 424 | summary: Sample response |
| 425 | description: Sample response for selecting 'sample 1'. |
| 426 | value: |
| 427 | bookstore: |
| 428 | categories: |
| 429 | - code: '01' |
| 430 | books: |
| 431 | - authors: |
| 432 | - Iain M. Banks |
| 433 | - Ursula K. Le Guin |
| 434 | name: SciFi |
| 435 | - code: '02' |
| 436 | books: |
| 437 | - authors: |
| 438 | - Philip Pullman |
| 439 | name: kids |
niamhcore | 66017b4 | 2021-10-19 11:07:02 +0100 | [diff] [blame] | 440 | |
lukegleeson | 82a550f | 2022-07-11 10:55:53 +0100 | [diff] [blame] | 441 | allCmHandleQueryParameters: |
| 442 | value: |
| 443 | cmHandleQueryParameters: |
| 444 | - conditionName: hasAllModules |
| 445 | conditionParameters: |
| 446 | - { "moduleName": "my-module-1" } |
| 447 | - { "moduleName": "my-module-2" } |
| 448 | - { "moduleName": "my-module-3" } |
| 449 | - conditionName: hasAllProperties |
| 450 | conditionParameters: |
| 451 | - { "Color": "yellow" } |
| 452 | - { "Shape": "circle" } |
| 453 | - { "Size": "small" } |
| 454 | - conditionName: cmHandleWithCpsPath |
| 455 | conditionParameters: |
| 456 | - { "cpsPath": "//state[@cm-handle-state='ADVISED']" } |
| 457 | pubPropCmHandleQueryParameters: |
| 458 | value: |
| 459 | cmHandleQueryParameters: |
| 460 | - conditionName: hasAllProperties |
| 461 | conditionParameters: |
| 462 | - { "Color": "yellow" } |
| 463 | - { "Shape": "circle" } |
| 464 | - { "Size": "small" } |
| 465 | modulesCmHandleQueryParameters: |
| 466 | value: |
| 467 | cmHandleQueryParameters: |
| 468 | - conditionName: hasAllModules |
| 469 | conditionParameters: |
| 470 | - { "moduleName": "my-module-1" } |
| 471 | - { "moduleName": "my-module-2" } |
| 472 | - { "moduleName": "my-module-3" } |
| 473 | cpsPathCmHandleStateQueryParameters: |
| 474 | value: |
| 475 | cmHandleQueryParameters: |
| 476 | - conditionName: cmHandleWithCpsPath |
| 477 | conditionParameters: |
| 478 | - { "cpsPath": "//state[@cm-handle-state='LOCKED']" } |
| 479 | cpsPathCmHandleDataSyncQueryParameters: |
| 480 | value: |
| 481 | cmHandleQueryParameters: |
| 482 | - conditionName: cmHandleWithCpsPath |
| 483 | conditionParameters: |
| 484 | - { "cpsPath": "//state[@data-sync-enabled='true']" } |
| 485 | |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 486 | parameters: |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 487 | cmHandleInPath: |
| 488 | name: cm-handle |
| 489 | in: path |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 490 | 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] | 491 | required: true |
| 492 | schema: |
| 493 | type: string |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 494 | example: my-cm-handle |
halil.cakal | 04280e2 | 2024-01-23 10:05:36 +0000 | [diff] [blame] | 495 | moduleNameInQuery: |
| 496 | name: module-name |
| 497 | in: query |
| 498 | description: Filter for a module name.This is an optional parameter |
| 499 | required: false |
| 500 | schema: |
| 501 | type: string |
| 502 | example: my-module |
| 503 | revisionInQuery: |
| 504 | name: revision |
| 505 | in: query |
| 506 | description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied |
| 507 | required: false |
| 508 | schema: |
| 509 | type: string |
| 510 | example: 2024-01-22 |
DylanB95EST | 6ddbe4a | 2022-07-19 11:36:10 +0100 | [diff] [blame] | 511 | dataSyncEnabled: |
| 512 | name: dataSyncEnabled |
| 513 | in: query |
| 514 | description: Is used to enable or disable the data synchronization flag |
| 515 | required: true |
| 516 | schema: |
| 517 | type: boolean |
| 518 | example: true |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 519 | xpathInQuery: |
| 520 | name: xpath |
| 521 | in: query |
| 522 | description: xpath |
| 523 | required: false |
| 524 | schema: |
| 525 | type: string |
| 526 | default: / |
Ruslan Kashapov | 1baf48d | 2021-05-07 10:46:27 +0300 | [diff] [blame] | 527 | requiredXpathInQuery: |
| 528 | name: xpath |
| 529 | in: query |
| 530 | description: xpath |
| 531 | required: true |
| 532 | schema: |
| 533 | type: string |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 534 | includeDescendantsOptionInQuery: |
| 535 | name: include-descendants |
| 536 | in: query |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 537 | description: Determines if descendants are included in response |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 538 | required: false |
| 539 | schema: |
| 540 | type: boolean |
| 541 | default: false |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 542 | cpsPathInQuery: |
| 543 | name: cps-path |
| 544 | in: query |
lukegleeson | 20e7a73 | 2022-10-20 10:14:00 +0100 | [diff] [blame] | 545 | description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 546 | required: false |
| 547 | schema: |
| 548 | type: string |
| 549 | default: / |
lukegleeson | 20e7a73 | 2022-10-20 10:14:00 +0100 | [diff] [blame] | 550 | examples: |
| 551 | container cps path: |
| 552 | value: //bookstore |
| 553 | list attributes cps path: |
| 554 | value: //categories[@code=1] |
emaclee | d340047 | 2022-08-19 09:26:39 +0100 | [diff] [blame] | 555 | dmiPluginIdentifierInQuery: |
| 556 | name: dmi-plugin-identifier |
| 557 | in: query |
| 558 | description: dmi-plugin-identifier |
| 559 | required: true |
| 560 | schema: |
| 561 | type: string |
| 562 | example: my-dmi-plugin |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 563 | resourceIdentifierInQuery: |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 564 | name: resourceIdentifier |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 565 | in: query |
| 566 | 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] | 567 | required: true |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 568 | allowReserved: true |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 569 | schema: |
| 570 | type: string |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 571 | examples: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 572 | sample 1: |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 573 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 574 | resourceIdentifier: \shops\bookstore |
| 575 | sample 2: |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 576 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 577 | resourceIdentifier: \shops\bookstore\categories[@code=1] |
| 578 | sample 3: |
niamhcore | fd2e6dd | 2021-09-29 16:43:35 +0100 | [diff] [blame] | 579 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 580 | resourceIdentifier: parent=shops,child=bookstore |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 581 | optionsParamInQuery: |
| 582 | name: options |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 583 | in: query |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 584 | description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'. The format of options parameter depend on the associated DMI Plugin implementation. |
tragait | c328551 | 2021-08-16 15:12:36 +0100 | [diff] [blame] | 585 | required: false |
| 586 | schema: |
| 587 | type: string |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 588 | allowReserved: true |
| 589 | examples: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 590 | sample 1: |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 591 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 592 | options: (depth=3) |
| 593 | sample 2: |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 594 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 595 | options: (fields=book) |
| 596 | sample 3: |
tragait | abdff1b | 2021-10-06 11:04:18 +0100 | [diff] [blame] | 597 | value: |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 598 | options: (depth=2,fields=book/authors) |
sourabh_sourabh | 1f2e66e | 2022-02-16 21:53:41 +0530 | [diff] [blame] | 599 | topicParamInQuery: |
| 600 | name: topic |
| 601 | in: query |
| 602 | description: topic parameter in query. |
| 603 | required: false |
| 604 | schema: |
| 605 | type: string |
| 606 | allowReserved: true |
| 607 | examples: |
| 608 | sample 1: |
| 609 | value: |
| 610 | topic: my-topic-name |
sourabh_sourabh | 4031d43 | 2023-03-27 14:36:20 +0100 | [diff] [blame] | 611 | requiredTopicParamInQuery: |
| 612 | name: topic |
| 613 | in: query |
| 614 | description: mandatory topic parameter in query. |
| 615 | required: true |
| 616 | schema: |
| 617 | type: string |
| 618 | allowReserved: true |
| 619 | examples: |
| 620 | sample 1: |
| 621 | value: |
| 622 | topic: my-topic-name |
tragait | c584bf2 | 2021-08-20 15:45:58 +0100 | [diff] [blame] | 623 | contentParamInHeader: |
| 624 | name: Content-Type |
| 625 | in: header |
| 626 | required: false |
| 627 | description: Content parameter for request, if content parameter is null, default value is application/json. |
| 628 | schema: |
| 629 | type: string |
| 630 | default: application/json |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 631 | example: application/yang-data+json |
danielhanrahan | c5222a7 | 2024-02-28 16:05:07 +0000 | [diff] [blame] | 632 | authorizationParamInHeader: |
| 633 | name: Authorization |
| 634 | in: header |
| 635 | required: false |
| 636 | description: Authorization parameter for request. |
| 637 | schema: |
| 638 | type: string |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 639 | datastoreName: |
lukegleeson | 20e7a73 | 2022-10-20 10:14:00 +0100 | [diff] [blame] | 640 | name: datastore-name |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 641 | in: path |
| 642 | description: The type of the requested data |
| 643 | required: true |
| 644 | schema: |
| 645 | type: string |
seanbeirne | afc6055 | 2023-01-30 16:53:37 +0000 | [diff] [blame] | 646 | example: ncmp-datastore:running |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 647 | |
| 648 | responses: |
| 649 | NotFound: |
| 650 | description: The specified resource was not found |
| 651 | content: |
| 652 | application/json: |
| 653 | schema: |
| 654 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 655 | example: |
| 656 | status: 400 |
| 657 | message: Not found error message |
| 658 | details: Not found error details |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 659 | Unauthorized: |
| 660 | description: Unauthorized |
| 661 | content: |
| 662 | application/json: |
| 663 | schema: |
| 664 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 665 | example: |
| 666 | status: 401 |
| 667 | message: Unauthorized error message |
| 668 | details: Unauthorized error details |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 669 | Forbidden: |
| 670 | description: Forbidden |
| 671 | content: |
| 672 | application/json: |
| 673 | schema: |
| 674 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 675 | example: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 676 | status: 403 |
| 677 | message: Forbidden error message |
| 678 | details: Forbidden error details |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 679 | BadRequest: |
| 680 | description: Bad Request |
| 681 | content: |
| 682 | application/json: |
| 683 | schema: |
| 684 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 685 | example: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 686 | status: 400 BAD_REQUEST |
| 687 | message: Bad request error message |
| 688 | details: Bad request error details |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 689 | Conflict: |
| 690 | description: Conflict |
| 691 | content: |
| 692 | application/json: |
| 693 | schema: |
| 694 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 695 | example: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 696 | status: 409 CONFLICT |
| 697 | message: Conflict error message |
| 698 | details: Conflict error details |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 699 | NotImplemented: |
| 700 | description: The given path has not been implemented |
| 701 | content: |
| 702 | application/json: |
| 703 | schema: |
| 704 | $ref: '#/components/schemas/ErrorMessage' |
emaclee | 844cab3 | 2021-12-01 09:42:37 +0000 | [diff] [blame] | 705 | example: |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 706 | status: 501 |
| 707 | message: Not implemented error message |
| 708 | details: Not implemented error details |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 709 | Ok: |
| 710 | description: OK |
| 711 | content: |
| 712 | application/json: |
| 713 | schema: |
| 714 | type: object |
| 715 | Created: |
| 716 | description: Created |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 717 | content: { } |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 718 | NoContent: |
| 719 | description: No Content |
bmiklos | bbaf501 | 2022-08-25 18:28:16 +0200 | [diff] [blame] | 720 | content: { } |
JosephKeenan | e0873dd | 2022-01-28 11:22:22 +0000 | [diff] [blame] | 721 | InternalServerError: |
| 722 | description: Internal Server Error |
| 723 | content: |
| 724 | application/json: |
| 725 | schema: |
| 726 | $ref: "#/components/schemas/ErrorMessage" |
| 727 | example: |
| 728 | status: 500 |
| 729 | message: Internal Server Error |
| 730 | details: Internal Server Error occurred |
mpriyank | 93afc1e | 2022-03-28 15:47:47 +0530 | [diff] [blame] | 731 | BadGateway: |
| 732 | description: Bad Gateway |
| 733 | content: |
| 734 | application/json: |
| 735 | schema: |
| 736 | $ref: "#/components/schemas/DmiErrorMessage" |
| 737 | example: |
| 738 | message: "Bad Gateway Error Message NCMP" |
| 739 | dmi-response: |
| 740 | http-code: 400 |
| 741 | body: "Bad Request" |