Skip to content

Commit c5ee1b5

Browse files
committed
adding "Health" definition to the OpenAPI File.
1 parent 7bba6f6 commit c5ee1b5

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

src/main/resources/META-INF/openapi.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,60 @@ info:
1717
tags:
1818
- name: Health and Metrics
1919
description: get metadada from the underlaying application.
20-
20+
21+
components:
22+
schemas:
23+
Health:
24+
type: object
25+
properties:
26+
status:
27+
type: string
28+
enum: [UP, DOWN]
29+
checks:
30+
type: array
31+
items:
32+
type: object
33+
properties:
34+
name:
35+
type: string
36+
status:
37+
type: string
38+
enum: [UP, DOWN]
39+
data:
40+
type: object
41+
properties:
42+
app_name:
43+
type: string
44+
decription: the application tiny name
45+
app_title:
46+
type: string
47+
description: the application full title
48+
app_version:
49+
type: string
50+
description: the application version
51+
pattern: '^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$'
52+
api_version:
53+
type: string
54+
description: the API version
55+
example : 'v1'
56+
api_full_path:
57+
type: string
58+
description: full path to the API
59+
example: '/api-impl-demo/v1/api'
60+
started_at:
61+
type: string
62+
format: date-time
63+
description: date-time when the application was started.
64+
uptime:
65+
type: string
66+
description: how long the application is running. Time format is hours:minutes:seconds.millisec.
67+
example: '00:00:28.174'
68+
required:
69+
- name
70+
- status
71+
required:
72+
- status
73+
- checks
2174
paths:
2275
/health:
2376
servers:
@@ -34,7 +87,7 @@ paths:
3487
content:
3588
application/json:
3689
schema:
37-
type: Object
90+
$ref: '#/components/schemas/Health'
3891
"500":
3992
description: The API is not ready.
4093
"404":

0 commit comments

Comments
 (0)