{"openapi":"3.0.0","info":{"version":"1.1.4","title":"5DriversAPI - organise rides","description":"API for 5Drivers platform <br> contains all operations on booking a group car and a so called spare car"},"tags":[{"name":"calendars","description":"operations on a calendar of a driver"},{"name":"group cars","description":"operations for group cars"},{"name":"spare cars","description":"operations for spare cars"}],"paths":{"/driver/{driverID}/calendars":{"get":{"summary":"returns the calendar of a driver with a given driverID","tags":["calendars"],"parameters":[{"$ref":"#/components/parameters/driverID"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar"}}}},"404":{"$ref":"#/components/responses/404Error"}}}},"/drivers/{driverID}/calendars/{period}":{"put":{"summary":"updates existing calendar of driver with given driverID with a given period","tags":["calendars"],"parameters":[{"$ref":"#/components/parameters/driverID"},{"$ref":"#/components/parameters/period"}],"responses":{"200":{"description":"ok"},"404":{"$ref":"#/components/responses/404Error"}}},"delete":{"summary":"deletes the entry in the calendar of a driver","tags":["calendars"],"parameters":[{"$ref":"#/components/parameters/driverID"},{"$ref":"#/components/parameters/period"}],"responses":{"200":{"description":"ok"},"404":{"$ref":"#/components/responses/404Error"}}}},"/sparecars/lists/{period}":{"get":{"summary":"returns the list of available spare cars for the given period","tags":["spare cars"],"parameters":[{"$ref":"#/components/parameters/period"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sparecarList"}}}},"404":{"$ref":"#/components/responses/404Error"}}}},"/sparecars/{carID}/calendars/{period}/{driverID}":{"put":{"summary":"updates existing calendar of a spare car with a given driverID and with a given period","tags":["spare cars"],"parameters":[{"$ref":"#/components/parameters/carID"},{"$ref":"#/components/parameters/period"},{"$ref":"#/components/parameters/driverID"}],"responses":{"200":{"description":"ok"},"404":{"$ref":"#/components/responses/404Error"}}},"delete":{"summary":"updates existing calendar of a spare car with a given driverID and with a given period","tags":["spare cars"],"parameters":[{"$ref":"#/components/parameters/carID"},{"$ref":"#/components/parameters/period"},{"$ref":"#/components/parameters/driverID"}],"responses":{"200":{"description":"ok"},"404":{"$ref":"#/components/responses/404Error"}}}},"/cars/{carID}/calendars/{period}":{"put":{"summary":"updates the calendar of a car by the known carID of the groups' car","tags":["group cars"],"parameters":[{"$ref":"#/components/parameters/carID"},{"$ref":"#/components/parameters/period"}],"responses":{"200":{"description":"ok"},"404":{"$ref":"#/components/responses/404Error"}}}}},"components":{"schemas":{"calendar":{"description":"representation of a calendar","type":"object","properties":{"periods":{"type":"array","items":{"$ref":"#/components/schemas/period"}}}},"car":{"description":"car object with its characteristics","type":"object","properties":{"class":{"description":"A Class, B Class, CLE class","type":"string","example":"A"},"carID":{"description":"unique ID of a car","type":"integer","example":73636252},"assigned":{"description":"declares a car to be assigned to a group or if it is free in stock","type":"boolean","example":true}}},"carID":{"description":"definition of the unique carID","type":"integer","example":93834747},"driverID":{"type":"integer","description":"definition of the unique driverID","example":93834747},"period":{"type":"string","description":"defines a period of time with a start and an end date","example":"1.1.2018/11:00-1.1.2018/13:00"},"sparecarList":{"type":"object","description":"list of car objects","properties":{"cars":{"type":"array","items":{"$ref":"#/components/schemas/car"}}}}},"parameters":{"driverID":{"name":"driverID","description":"ID of driver","in":"path","required":true,"schema":{"$ref":"#/components/schemas/driverID"}},"carID":{"name":"carID","description":"unique ID of a car","in":"path","required":true,"schema":{"$ref":"#/components/schemas/carID"}},"period":{"name":"period","description":"timestamp of leasing period","in":"path","required":true,"schema":{"$ref":"#/components/schemas/period"}}},"responses":{"201Created":{"description":"created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400Error":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"404Error":{"description":"Unknown ressource","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Zeppelin-University/5Drivers_API/1.1.0"}]}