-
Notifications
You must be signed in to change notification settings - Fork 0
/
getraenkeapi.yml
262 lines (257 loc) · 6.67 KB
/
getraenkeapi.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
openapi: '3.0.3'
info:
title: Getränketinder
version: '1.0'
servers:
- url: https://getraenketinder.fiber.garden/v1
paths:
/getraenk:
put:
description: Create new getraenk that can be tindered
tags:
- getraenk
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/UploadGetraenk'
default:
likes: 0
dislikes: 0
superlikes: 0
responses:
201:
description: New getraenk created succesfully
content:
application/json:
schema:
$ref: '#/components/schemas/Getraenk'
400:
description: Invalid request
500:
description: Internal Server Error
get:
description: Get a list of all getraenks
tags:
- getraenk
responses:
200:
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetraenkeList'
/getraenk/{uuid}:
get:
description: Get a the getraenks
tags:
- getraenk
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
responses:
200:
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Getraenk'
patch:
description: Update a getraenk
tags:
- getraenk
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/UploadGetraenk'
responses:
200:
description: getraenk updated succesfully
content:
application/json:
schema:
$ref: '#/components/schemas/Getraenk'
400:
description: Invalid request
delete:
description: Delete the getraenk
tags:
- getraenk
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
responses:
200:
description: Success
/getraenk/{uuid}/like:
post:
description: Add a like to a getraenk
tags:
- votes
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
responses:
201:
description: Like added succesfully
400:
description: Invalid request
/getraenk/{uuid}/dislike:
post:
description: Add a dislike to a getraenk
tags:
- votes
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
responses:
201:
description: Dislike added succesfully
400:
description: Invalid request
/getraenk/{uuid}/superlike:
post:
description: Add a superlike to a getraenk
tags:
- votes
parameters:
- in: path
name: uuid
schema:
type: string
required: true
description: uuid of the getraenk
responses:
201:
description: Superlike added succesfully
400:
description: Invalid request
components:
schemas:
Getraenk:
type: object
required:
- name
properties:
name:
type: string
description: Name of the getraenk
example: Mustersprudel
uuid:
type: string
description: UUID of the getraenk based on the name
uid:
type: string
description: SHA256 hash of the name of the Getraenk
images:
type: array
description: Images of the getraenk
items:
$ref: '#/components/schemas/Image'
presentation:
type: string
description: More detail of the getraenk
example: The most sprudeligst Sprudel of all the getraenke-verse.
likes:
type: integer
description: Number of likes the getraenk recieved
example: 420
dislikes:
type: integer
description: Numberof dislikes the getraenk recieved
example: 69
superlikes:
type: integer
description: Numberof superlikes the getraenk recieved
example: 69
UploadGetraenk:
type: object
required:
- name
properties:
name:
type: string
description: Name of the getraenk
example: Mustersprudel
uuid:
type: string
description: UUID of the getraenk based on the name
uid:
type: string
description: SHA256 hash of the name of the Getraenk
images:
type: array
description: Images of the getraenk
items:
type: string
format: binary
presentation:
type: string
description: More detail of the getraenk
example: The most sprudeligst Sprudel of all the getraenke-verse.
likes:
type: integer
description: Number of likes the getraenk recieved
example: 420
dislikes:
type: integer
description: Numberof dislikes the getraenk recieved
example: 69
superlikes:
type: integer
description: Numberof superlikes the getraenk recieved
example: 69
GetraenkeList:
type: array
description: List of all getraenks
items:
$ref: '#/components/schemas/Getraenk'
Image:
type: object
required:
- url
properties:
url:
description: URL of bictures S3 location
type: string
hash:
description: SHA256 hash of bicture
type: string
height:
description: height of bicture in px
type: integer
width:
description: width of bicture in px
type: integer
weird_background_hash:
description: weird background hash for happy users
type: string
mime_type:
description: MIME type of bicture
type: string