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