backend/api/event/documentation/1.0.0/event.json (view raw)
1{
2 "paths": {
3 "/events": {
4 "get": {
5 "deprecated": false,
6 "description": "",
7 "responses": {
8 "200": {
9 "description": "response",
10 "content": {
11 "application/json": {
12 "schema": {
13 "type": "array",
14 "items": {
15 "$ref": "#/components/schemas/Event"
16 }
17 }
18 }
19 }
20 },
21 "403": {
22 "description": "Forbidden",
23 "content": {
24 "application/json": {
25 "schema": {
26 "$ref": "#/components/schemas/Error"
27 }
28 }
29 }
30 },
31 "404": {
32 "description": "Not found",
33 "content": {
34 "application/json": {
35 "schema": {
36 "$ref": "#/components/schemas/Error"
37 }
38 }
39 }
40 },
41 "default": {
42 "description": "unexpected error",
43 "content": {
44 "application/json": {
45 "schema": {
46 "$ref": "#/components/schemas/Error"
47 }
48 }
49 }
50 }
51 },
52 "summary": "",
53 "tags": [
54 "Event"
55 ],
56 "parameters": [
57 {
58 "name": "_limit",
59 "in": "query",
60 "required": false,
61 "description": "Maximum number of results possible",
62 "schema": {
63 "type": "integer"
64 },
65 "deprecated": false
66 },
67 {
68 "name": "_sort",
69 "in": "query",
70 "required": false,
71 "description": "Sort according to a specific field.",
72 "schema": {
73 "type": "string"
74 },
75 "deprecated": false
76 },
77 {
78 "name": "_start",
79 "in": "query",
80 "required": false,
81 "description": "Skip a specific number of entries (especially useful for pagination)",
82 "schema": {
83 "type": "integer"
84 },
85 "deprecated": false
86 },
87 {
88 "name": "=",
89 "in": "query",
90 "required": false,
91 "description": "Get entries that matches exactly your input",
92 "schema": {
93 "type": "string"
94 },
95 "deprecated": false
96 },
97 {
98 "name": "_ne",
99 "in": "query",
100 "required": false,
101 "description": "Get records that are not equals to something",
102 "schema": {
103 "type": "string"
104 },
105 "deprecated": false
106 },
107 {
108 "name": "_lt",
109 "in": "query",
110 "required": false,
111 "description": "Get record that are lower than a value",
112 "schema": {
113 "type": "string"
114 },
115 "deprecated": false
116 },
117 {
118 "name": "_lte",
119 "in": "query",
120 "required": false,
121 "description": "Get records that are lower than or equal to a value",
122 "schema": {
123 "type": "string"
124 },
125 "deprecated": false
126 },
127 {
128 "name": "_gt",
129 "in": "query",
130 "required": false,
131 "description": "Get records that are greater than a value",
132 "schema": {
133 "type": "string"
134 },
135 "deprecated": false
136 },
137 {
138 "name": "_gte",
139 "in": "query",
140 "required": false,
141 "description": "Get records that are greater than or equal a value",
142 "schema": {
143 "type": "string"
144 },
145 "deprecated": false
146 },
147 {
148 "name": "_contains",
149 "in": "query",
150 "required": false,
151 "description": "Get records that contains a value",
152 "schema": {
153 "type": "string"
154 },
155 "deprecated": false
156 },
157 {
158 "name": "_containss",
159 "in": "query",
160 "required": false,
161 "description": "Get records that contains (case sensitive) a value",
162 "schema": {
163 "type": "string"
164 },
165 "deprecated": false
166 },
167 {
168 "name": "_in",
169 "in": "query",
170 "required": false,
171 "description": "Get records that matches any value in the array of values",
172 "schema": {
173 "type": "array",
174 "items": {
175 "type": "string"
176 }
177 },
178 "deprecated": false
179 },
180 {
181 "name": "_nin",
182 "in": "query",
183 "required": false,
184 "description": "Get records that doesn't match any value in the array of values",
185 "schema": {
186 "type": "array",
187 "items": {
188 "type": "string"
189 }
190 },
191 "deprecated": false
192 }
193 ]
194 },
195 "post": {
196 "deprecated": false,
197 "description": "Create a new record",
198 "responses": {
199 "200": {
200 "description": "response",
201 "content": {
202 "application/json": {
203 "schema": {
204 "$ref": "#/components/schemas/Event"
205 }
206 }
207 }
208 },
209 "403": {
210 "description": "Forbidden",
211 "content": {
212 "application/json": {
213 "schema": {
214 "$ref": "#/components/schemas/Error"
215 }
216 }
217 }
218 },
219 "404": {
220 "description": "Not found",
221 "content": {
222 "application/json": {
223 "schema": {
224 "$ref": "#/components/schemas/Error"
225 }
226 }
227 }
228 },
229 "default": {
230 "description": "unexpected error",
231 "content": {
232 "application/json": {
233 "schema": {
234 "$ref": "#/components/schemas/Error"
235 }
236 }
237 }
238 }
239 },
240 "summary": "",
241 "tags": [
242 "Event"
243 ],
244 "requestBody": {
245 "description": "",
246 "required": true,
247 "content": {
248 "application/json": {
249 "schema": {
250 "$ref": "#/components/schemas/NewEvent"
251 }
252 }
253 }
254 }
255 }
256 },
257 "/events/count": {
258 "get": {
259 "deprecated": false,
260 "description": "",
261 "responses": {
262 "200": {
263 "description": "response",
264 "content": {
265 "application/json": {
266 "schema": {
267 "properties": {
268 "count": {
269 "type": "integer"
270 }
271 }
272 }
273 }
274 }
275 },
276 "403": {
277 "description": "Forbidden",
278 "content": {
279 "application/json": {
280 "schema": {
281 "$ref": "#/components/schemas/Error"
282 }
283 }
284 }
285 },
286 "404": {
287 "description": "Not found",
288 "content": {
289 "application/json": {
290 "schema": {
291 "$ref": "#/components/schemas/Error"
292 }
293 }
294 }
295 },
296 "default": {
297 "description": "unexpected error",
298 "content": {
299 "application/json": {
300 "schema": {
301 "$ref": "#/components/schemas/Error"
302 }
303 }
304 }
305 }
306 },
307 "summary": "",
308 "tags": [
309 "Event"
310 ],
311 "parameters": []
312 }
313 },
314 "/events/{id}": {
315 "get": {
316 "deprecated": false,
317 "description": "",
318 "responses": {
319 "200": {
320 "description": "response",
321 "content": {
322 "application/json": {
323 "schema": {
324 "$ref": "#/components/schemas/Event"
325 }
326 }
327 }
328 },
329 "403": {
330 "description": "Forbidden",
331 "content": {
332 "application/json": {
333 "schema": {
334 "$ref": "#/components/schemas/Error"
335 }
336 }
337 }
338 },
339 "404": {
340 "description": "Not found",
341 "content": {
342 "application/json": {
343 "schema": {
344 "$ref": "#/components/schemas/Error"
345 }
346 }
347 }
348 },
349 "default": {
350 "description": "unexpected error",
351 "content": {
352 "application/json": {
353 "schema": {
354 "$ref": "#/components/schemas/Error"
355 }
356 }
357 }
358 }
359 },
360 "summary": "",
361 "tags": [
362 "Event"
363 ],
364 "parameters": [
365 {
366 "name": "id",
367 "in": "path",
368 "description": "",
369 "deprecated": false,
370 "required": true,
371 "schema": {
372 "type": "string"
373 }
374 }
375 ]
376 },
377 "put": {
378 "deprecated": false,
379 "description": "Update a record",
380 "responses": {
381 "200": {
382 "description": "response",
383 "content": {
384 "application/json": {
385 "schema": {
386 "$ref": "#/components/schemas/Event"
387 }
388 }
389 }
390 },
391 "403": {
392 "description": "Forbidden",
393 "content": {
394 "application/json": {
395 "schema": {
396 "$ref": "#/components/schemas/Error"
397 }
398 }
399 }
400 },
401 "404": {
402 "description": "Not found",
403 "content": {
404 "application/json": {
405 "schema": {
406 "$ref": "#/components/schemas/Error"
407 }
408 }
409 }
410 },
411 "default": {
412 "description": "unexpected error",
413 "content": {
414 "application/json": {
415 "schema": {
416 "$ref": "#/components/schemas/Error"
417 }
418 }
419 }
420 }
421 },
422 "summary": "",
423 "tags": [
424 "Event"
425 ],
426 "requestBody": {
427 "description": "",
428 "required": true,
429 "content": {
430 "application/json": {
431 "schema": {
432 "$ref": "#/components/schemas/NewEvent"
433 }
434 }
435 }
436 },
437 "parameters": [
438 {
439 "name": "id",
440 "in": "path",
441 "description": "",
442 "deprecated": false,
443 "required": true,
444 "schema": {
445 "type": "string"
446 }
447 }
448 ]
449 },
450 "delete": {
451 "deprecated": false,
452 "description": "Delete a record",
453 "responses": {
454 "200": {
455 "description": "deletes a single record based on the ID supplied",
456 "content": {
457 "application/json": {
458 "schema": {
459 "type": "integer",
460 "format": "int64"
461 }
462 }
463 }
464 },
465 "403": {
466 "description": "Forbidden",
467 "content": {
468 "application/json": {
469 "schema": {
470 "$ref": "#/components/schemas/Error"
471 }
472 }
473 }
474 },
475 "404": {
476 "description": "Not found",
477 "content": {
478 "application/json": {
479 "schema": {
480 "$ref": "#/components/schemas/Error"
481 }
482 }
483 }
484 },
485 "default": {
486 "description": "unexpected error",
487 "content": {
488 "application/json": {
489 "schema": {
490 "$ref": "#/components/schemas/Error"
491 }
492 }
493 }
494 }
495 },
496 "summary": "",
497 "tags": [
498 "Event"
499 ],
500 "parameters": [
501 {
502 "name": "id",
503 "in": "path",
504 "description": "",
505 "deprecated": false,
506 "required": true,
507 "schema": {
508 "type": "string"
509 }
510 }
511 ]
512 }
513 }
514 },
515 "components": {
516 "schemas": {
517 "Event": {
518 "required": [
519 "id",
520 "name",
521 "email"
522 ],
523 "properties": {
524 "id": {
525 "type": "string"
526 },
527 "name": {
528 "type": "string"
529 },
530 "email": {
531 "type": "string"
532 },
533 "date": {
534 "type": "string"
535 },
536 "address": {
537 "type": "string"
538 },
539 "cars": {
540 "type": "array",
541 "items": {
542 "required": [
543 "id",
544 "name",
545 "seats"
546 ],
547 "properties": {
548 "id": {
549 "type": "string"
550 },
551 "name": {
552 "type": "string"
553 },
554 "seats": {
555 "type": "integer"
556 },
557 "meeting": {
558 "type": "string"
559 },
560 "departure": {
561 "type": "datetime"
562 },
563 "phone_number": {
564 "type": "string"
565 },
566 "details": {
567 "type": "string"
568 },
569 "event": {
570 "type": "string"
571 },
572 "passengers": {
573 "type": "object"
574 }
575 }
576 }
577 },
578 "position": {
579 "type": "object"
580 },
581 "waiting_list": {
582 "type": "object"
583 },
584 "users": {
585 "type": "array",
586 "items": {
587 "required": [
588 "id",
589 "username",
590 "email"
591 ],
592 "properties": {
593 "id": {
594 "type": "string"
595 },
596 "username": {
597 "type": "string"
598 },
599 "firstName": {
600 "type": "string"
601 },
602 "lastName": {
603 "type": "string"
604 },
605 "email": {
606 "type": "string"
607 },
608 "provider": {
609 "type": "string"
610 },
611 "password": {
612 "type": "string"
613 },
614 "resetPasswordToken": {
615 "type": "string"
616 },
617 "confirmed": {
618 "type": "boolean"
619 },
620 "blocked": {
621 "type": "boolean"
622 },
623 "role": {
624 "type": "string"
625 },
626 "events": {
627 "type": "array",
628 "items": {
629 "type": "string"
630 }
631 }
632 }
633 }
634 }
635 }
636 },
637 "NewEvent": {
638 "required": [
639 "name",
640 "email"
641 ],
642 "properties": {
643 "name": {
644 "type": "string"
645 },
646 "email": {
647 "type": "string"
648 },
649 "date": {
650 "type": "string"
651 },
652 "address": {
653 "type": "string"
654 },
655 "cars": {
656 "type": "array",
657 "items": {
658 "type": "string"
659 }
660 },
661 "position": {
662 "type": "object"
663 },
664 "waiting_list": {
665 "type": "object"
666 },
667 "users": {
668 "type": "array",
669 "items": {
670 "type": "string"
671 }
672 }
673 }
674 }
675 }
676 },
677 "tags": [
678 {
679 "name": "Event"
680 }
681 ]
682}