Merge "Expose Prometheus metrics for monitoring"
[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     MultipartFile:
33       required:
34         - file
35       properties:
36         multipartFile:
37           type: string
38           description: multipartFile
39           format: binary
40
41   parameters:
42     cmHandleInPath:
43       name: cm-handle
44       in: path
45       description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
46       required: true
47       schema:
48         type: string
49     xpathInQuery:
50       name: xpath
51       in: query
52       description: xpath
53       required: false
54       schema:
55         type: string
56         default: /
57     requiredXpathInQuery:
58       name: xpath
59       in: query
60       description: xpath
61       required: true
62       schema:
63         type: string
64     includeDescendantsOptionInQuery:
65       name: include-descendants
66       in: query
67       description: include-descendants
68       required: false
69       schema:
70         type: boolean
71         default: false
72     cpsPathInQuery:
73       name: cps-path
74       in: query
75       description: cps-path
76       required: false
77       schema:
78         type: string
79         default: /
80
81
82   responses:
83     NotFound:
84       description: The specified resource was not found
85       content:
86         application/json:
87           schema:
88             $ref: '#/components/schemas/ErrorMessage'
89     Unauthorized:
90       description: Unauthorized
91       content:
92         application/json:
93           schema:
94             $ref: '#/components/schemas/ErrorMessage'
95     Forbidden:
96       description: Forbidden
97       content:
98         application/json:
99           schema:
100             $ref: '#/components/schemas/ErrorMessage'
101     BadRequest:
102       description: Bad Request
103       content:
104         application/json:
105           schema:
106             $ref: '#/components/schemas/ErrorMessage'
107     Conflict:
108       description: Conflict
109       content:
110         application/json:
111           schema:
112             $ref: '#/components/schemas/ErrorMessage'
113     NotImplemented:
114       description: The given path has not been implemented
115       content:
116         application/json:
117           schema:
118             $ref: '#/components/schemas/ErrorMessage'
119     Ok:
120       description: OK
121       content:
122         application/json:
123           schema:
124             type: object
125     Created:
126       description: Created
127       content:
128         text/plain:
129           schema:
130             type: string
131     NoContent:
132       description: No Content
133       content: {}