Fix Spectral error and add https scheme
[externalapi/nbi.git] / docs / offeredapis / api_status / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.swagger: "2.0"
14 swagger: "2.0"
15 info:
16   description: "Provides a healthcheck to verify that the NBI component is running\
17     \ fine as a standalone application or can also communicate with other onap modules.\n\
18     \n"
19   version: "4.1.0"
20   title: "Status API"
21   contact:
22     name: "ONAP"
23     url: "https://onap.readthedocs.io"
24     email: "onap-discuss@lists.onap.org"
25   license:
26     name: "Apache 2.0"
27     url: "http://www.apache.org/licenses/LICENSE-2.0"
28   x-planned-retirement-date: "205001"
29   x-component: "NBI"
30   x-logo:
31     url: "/redoc/logo.png"
32     backgroundColor: "#FFFFFF"
33 host: "serverRoot:30274"
34 basePath: "/nbi/api/v4"
35 schemes:
36 - "http"
37 - "https"
38 produces:
39 - "application/json;charset=utf-8"
40 tags:
41 - name: "Status"
42   description: ""
43 paths:
44   x-interface:
45     api-version: "4.1.0"
46     last-mod-release: "Frankfurt"
47   /status:
48     get:
49       tags:
50       - "Status"
51       produces:
52       - "application/json;charset=utf-8"
53       operationId: "status_Find"
54       summary: "retrieve application status"
55       description: "* Default\n\n```\n{\n    \"name\": \"nbi\",\n    \"status\": \"\
56         ok\",\n    \"version\": \"v3\"\n}\n```\n\n* Optional\n\n```\n?fullStatus=true\n\
57         ```\n\n```\n{\n    \"name\": \"nbi\",\n    \"status\": \"ok\",\n    \"version\"\
58         : \"v3\",\n    \"components\": [\n        {\n            \"name\": \"sdc connectivity\"\
59         ,\n            \"status\": \"ko\"\n        },\n        {\n            \"name\"\
60         : \"so connectivity\",\n            \"status\": \"ok\"\n        },\n     \
61         \   {\n            \"name\": \"aai connectivity\",\n            \"status\"\
62         : \"ok\"\n        },\n        {\n            \"name\": \"dmaap connectivity\"\
63         ,\n            \"status\": \"ok\"\n        }\n    ]\n}\n```"
64       deprecated: false
65       parameters:
66       - name: "fullStatus"
67         required: false
68         in: "query"
69         description: ""
70         type: "boolean"
71         default: false
72       responses:
73         "200":
74           description: "Ok"
75           schema:
76             $ref: "#/definitions/Status"
77 definitions:
78   StatusValue:
79     description: "Status Value"
80     type: "string"
81     enum:
82     - "ok"
83     - "ko"
84   ComponentsName:
85     description: "Components Name"
86     type: "string"
87     enum:
88     - "sdc connectivity"
89     - "so connectivity"
90     - "aai connectivity"
91     - "dmaap connectivity"
92   ApplicationName:
93     description: "Application Name"
94     type: "string"
95     enum:
96     - "nbi"
97   ErrorDetail:
98     description: "Error code, inforURL, description and message"
99     required:
100     - "code"
101     - "message"
102     type: "object"
103     properties:
104       code:
105         description: ""
106         type: "integer"
107         format: "int32"
108       message:
109         description: ""
110         type: "string"
111       description:
112         description: ""
113         type: "string"
114       infoURL:
115         description: ""
116         type: "string"
117   Error:
118     description: "Error code and message"
119     required:
120     - "code"
121     - "message"
122     type: "object"
123     properties:
124       code:
125         description: ""
126         type: "integer"
127         format: "int32"
128       message:
129         description: ""
130         type: "string"
131       description:
132         description: ""
133         type: "string"
134       infoURL:
135         description: ""
136         type: "string"
137       details:
138         type: "array"
139         items:
140           $ref: "#/definitions/ErrorDetail"
141   Component:
142     description: "Component"
143     required:
144     - "name"
145     - "status"
146     type: "object"
147     properties:
148       name:
149         $ref: "#/definitions/ComponentsName"
150       status:
151         $ref: "#/definitions/StatusValue"
152   Status:
153     description: "Status"
154     required:
155     - "name"
156     - "status"
157     - "version"
158     - "components"
159     type: "object"
160     properties:
161       name:
162         $ref: "#/definitions/ApplicationName"
163       status:
164         $ref: "#/definitions/StatusValue"
165       version:
166         description: ""
167         type: "string"
168       components:
169         type: "array"
170         items:
171           $ref: "#/definitions/Component"