Update CmHandle in DMI-Registry for a DMI-Plugin Instance in NCMP as part of dmi...
[cps.git] / cps-ncmp-rest / docs / openapi / components.yaml
1 #  ============LICENSE_START=======================================================
2 #  Copyright (C) 2021 Nordix Foundation
3 #  Modifications Copyright (C) 2021 Pantheon.tech
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
10 #
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
20 components:
21   schemas:
22     ErrorMessage:
23       type: object
24       title: Error
25       properties:
26         status:
27           type: string
28         message:
29           type: string
30         details:
31           type: string
32
33     RestDmiPluginRegistration:
34       type: object
35       properties:
36         dmiPlugin:
37           type: string
38           example: onap-dmi-plugin
39         createdCmHandles:
40           type: array
41           items:
42             $ref: '#/components/schemas/RestCmHandle'
43         updatedCmHandles:
44           type: array
45           items:
46             $ref: '#/components/schemas/RestCmHandle'
47
48     RestCmHandle:
49       required:
50         - cmHandle
51       type: object
52       properties:
53         cmHandle:
54           type: string
55           example: cmHandle123
56         cmHandleProperties:
57             $ref: '#/components/schemas/RestCmHandleAdditionalProperties'
58     RestCmHandleAdditionalProperties:
59         type: object
60         additionalProperties:
61             type: string
62             example: system-001
63
64   parameters:
65     cmHandleInPath:
66       name: cm-handle
67       in: path
68       description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
69       required: true
70       schema:
71         type: string
72     xpathInQuery:
73       name: xpath
74       in: query
75       description: xpath
76       required: false
77       schema:
78         type: string
79         default: /
80     requiredXpathInQuery:
81       name: xpath
82       in: query
83       description: xpath
84       required: true
85       schema:
86         type: string
87     includeDescendantsOptionInQuery:
88       name: include-descendants
89       in: query
90       description: include-descendants
91       required: false
92       schema:
93         type: boolean
94         default: false
95     cpsPathInQuery:
96       name: cps-path
97       in: query
98       description: cps-path
99       required: false
100       schema:
101         type: string
102         default: /
103     resourceIdentifierInPath:
104       name: resourceIdentifier
105       in: path
106       description: Resource identifier to get/set the resource data
107       required: true
108       schema:
109         type: string
110     acceptParamInHeader:
111       name: accept
112       in: header
113       required: false
114       description: Accept parameter for response, if accept parameter is null, that means client can accept any format.
115       schema:
116         type: string
117         enum: [ application/json, application/yang-data+json ]
118     fieldsParamInQuery:
119       name: fields
120       in: query
121       description: Fields parameter to filter resource
122       required: false
123       schema:
124         type: string
125     depthParamInQuery:
126       name: depth
127       in: query
128       description: Depth parameter for response
129       required: false
130       schema:
131         type: integer
132         minimum: 1
133
134
135   responses:
136     NotFound:
137       description: The specified resource was not found
138       content:
139         application/json:
140           schema:
141             $ref: '#/components/schemas/ErrorMessage'
142     Unauthorized:
143       description: Unauthorized
144       content:
145         application/json:
146           schema:
147             $ref: '#/components/schemas/ErrorMessage'
148     Forbidden:
149       description: Forbidden
150       content:
151         application/json:
152           schema:
153             $ref: '#/components/schemas/ErrorMessage'
154     BadRequest:
155       description: Bad Request
156       content:
157         application/json:
158           schema:
159             $ref: '#/components/schemas/ErrorMessage'
160     Conflict:
161       description: Conflict
162       content:
163         application/json:
164           schema:
165             $ref: '#/components/schemas/ErrorMessage'
166     NotImplemented:
167       description: The given path has not been implemented
168       content:
169         application/json:
170           schema:
171             $ref: '#/components/schemas/ErrorMessage'
172     Ok:
173       description: OK
174       content:
175         application/json:
176           schema:
177             type: object
178     Created:
179       description: Created
180       content: {}
181     NoContent:
182       description: No Content
183       content: {}