-
Notifications
You must be signed in to change notification settings - Fork 2
/
Swagger_GestureWeb.yml
206 lines (201 loc) · 4.88 KB
/
Swagger_GestureWeb.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
swagger: "2.0"
info:
description: "This is a server."
version: "1.0.0"
title: "Swagger_GestureWeb"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "petstore.swagger.io"
basePath: "/api"
tags:
- name: "user"
description: "Operations about user"
- name: "experiment"
description: "Everything about your experiments"
schemes:
- "https"
- "http"
paths:
/login:
post:
tags:
- "user"
summary: "Request authentication"
description: "This method logs the user in."
operationId: "login"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "User object that needs to be logged in."
required: true
schema:
$ref: "#/definitions/User"
responses:
405:
description: "Invalid input"
/experiment:
post:
tags:
- "experiment"
summary: "Create an experiment"
description: "This method creates an experiment with the given parameters."
operationId: "createExperiment"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Experiment object of the experiment that needs to be created."
required: true
schema:
$ref: "#/definitions/Experiment"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Experiment"
405:
description: "Invalid input"
get:
tags:
- "experiment"
summary: "List the current user's experiments"
description: "This method retrieves the whole list of experiments created by the user that is logged in."
operationId: "listExperiments"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "User object whose experiments are to be listed."
required: true
schema:
$ref: "#/definitions/Experiment"
responses:
405:
description: "Invalid user"
/experiment/{experimentId}:
get:
tags:
- "experiment"
summary: "Request authentication"
description: "This method logs the user in."
operationId: "getExperiments"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "path"
name: "experimentId"
type: "integer"
required: true
responses:
405:
description: "Invalid input"
put:
tags:
- "experiment"
summary: "Update experiment"
description: "This method updates an experiment given its id."
operationId: "updateExperiment"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "experimentId"
in: "path"
description: "ID of experiment to update"
required: true
type: "integer"
format: "int64"
responses:
405:
description: "Invalid input"
delete:
tags:
- "experiment"
summary: "Delete experiment"
description: "This method deletes the experiment."
operationId: "deleteExperiment"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "path"
name: "experimentId"
type: "integer"
required: true
responses:
200:
description: "successful operation"
400:
description: "Invalid experiment"
404:
description: "No experiment with that ID was found."
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
User:
type: "object"
properties:
id:
type: "integer"
format: "int64"
username:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
email:
type: "string"
password:
type: "string"
Experiment:
type: "object"
required:
- "name"
- "id"
- "usrRef"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
startDate:
type: "string"
format: "date-time"
endDate:
type: "string"
format: "date-time"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"