-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
127 lines (127 loc) · 3.25 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
openapi: "3.0.3"
info:
title: TimeService
description: A simple service that gives time
contact:
url: https://github.com/Tecktron/timeservice
version: 1.0.0
paths:
/:
summary: Get the current UTC time
get:
responses:
'200':
$ref: '#/components/responses/time'
/{timezone}:
summary: Get the current time in the requested time zone.
get:
parameters:
- in: path
name: timezone
description: The name of a time zone
required: true
schema:
type: string
examples:
GMT:
value: 'GMT'
'Asia/Taipei':
value: 'Asia/Taipei'
'America/Argentina/Buenos_Aires':
value: 'America/Argentina/Buenos_Aires'
responses:
'200':
$ref: '#/components/responses/time'
/timezones:
summary: Get a list of all timezones
get:
responses:
'200':
$ref: '#/components/responses/timeZones'
/timezones/{filter}:
summary: Get a filtered list of timezones
get:
parameters:
- in: path
name: filter
description: The offset or area to filter by
required: true
schema:
type: string
examples:
full_offset:
value: '+0500'
half_hour_offset:
value: '-0930'
half_hour_min_offset:
value: '430'
double_digit_offset:
value: '01'
single_digit_offset:
value: '9'
negative_sinlge_digit_offset:
value: '-8'
area:
value: 'antarctica'
responses:
'200':
$ref: '#/components/responses/timeZones'
/health:
get:
responses:
'200':
description: System is up
content:
text/plain:
schema:
type: string
example: Ok
/help:
get:
responses:
'200':
description: The HTML help page.
content:
text/html:
schema:
type: string
components:
responses:
time:
description: The time in ISO-8601 format
content:
text/plain:
schema:
type: string
format: date-time
example: '2021-01-01T00:00:00.000000+00:00'
timeZones:
description: The output of
content:
text/plain:
schema:
type: string
example: |
Antarctica/Palmer: -0300
Antarctica/Troll: +0200
Antarctica/South_Pole: +1200
text/html:
schema:
type: string
text/csv:
schema:
type: string
example: |
"timezone","UTC offset"
"Antarctica/Palmer","-0300"
"Antarctica/Troll","+0200"
"Antarctica/South_Pole","+1200"
application/json:
schema:
type: object
additionalProperties:
type: string
example:
Antarctica/Palmer: '-0300'
Antarctica/Troll: '+0200'
Antarctica/South_Pole: '+1200'