all repos — caroster @ e4a74c241fa1fba8c2e29c2454419b425076d81a

[Octree] Group carpool to your event https://caroster.io

api/car/documentation/1.0.0/car.json (view raw)

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