-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
124 lines (124 loc) · 3.73 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
openapi: '3.0.0'
info:
description: 'This is a Minutes server for managing time strings based on a timeId. Valid time strings are formatted as "HH:MM ${meridiem}" with zero padding. For example "12:12 AM" or "01:05 PM"'
version: '1.0.0'
title: 'Minutes Server'
license:
name: 'Apache 2.0'
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
paths:
/time:
post:
summary: 'Create a time instance'
operationId: 'createTime'
requestBody:
description: 'Optionally pass a valid timestring to initialize with.'
required: false
content:
'application/json':
schema:
type: 'object'
properties:
initialTime:
type: 'string'
required:
- 'initialTime'
responses:
200:
description: 'New timeId successfully created'
content:
'application/json; charset=UTF-8':
schema:
type: 'object'
properties:
timeId:
type: 'string'
format: 'uuid'
currentTime:
type: 'string'
400:
description: 'Invalid request'
500:
description: 'Server unable to complete request'
/time/{timeId}:
parameters:
- name: 'timeId'
in: 'path'
required: true
description: 'A valid timeId object identifier'
schema:
type: 'string'
format: 'uuid'
example: '2eeacc6c-3d66-4bc9-a685-675ca7913831'
get:
summary: 'Get current time'
description: 'Retrieve the current time of a timeId'
operationId: 'getTime'
responses:
200:
description: 'Current time for timeId'
content:
'application/json; charset=UTF-8':
schema:
type: 'object'
properties:
currentTime:
type: 'string'
400:
description: 'Invalid request'
404:
description: 'TimeId requested not found'
405:
description: 'No timeId provided'
500:
description: 'Server unable to complete request'
put:
summary: 'Update the current time'
description: 'Update the time for a timeId.'
operationId: 'changeTime'
requestBody:
description: 'Number of minutes to add to current time for a given timeId'
required: true
content:
'application/json':
schema:
type: 'object'
properties:
addMinutes:
type: 'integer'
format: 'int64'
required:
- 'addMinutes'
responses:
200:
description: 'Successfully updated timeId'
content:
'application/json; charset=UTF-8':
schema:
type: 'object'
properties:
currentTime:
type: 'string'
400:
description: 'Invalid request'
404:
description: 'TimeId requested not found'
405:
description: 'No timeId provided'
500:
description: 'Server unable to complete request'
delete:
summary: 'Delete a time instance'
description: 'Delete a time instance based on timeId.'
operationId: 'deleteTime'
responses:
204:
description: 'TimeId destroyed successfully'
400:
description: 'Invalid request'
404:
description: 'TimeId requested not found'
405:
description: 'No timeId provided'
500:
description: 'Server unable to complete request'