-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-docs.json
1 lines (1 loc) · 13.5 KB
/
api-docs.json
1
{"openapi":"3.0.1","info":{"title":"Enigmat Shop","description":"Enigmat Shop is an e-commerce API","contact":{"name":"Enigma Camp","url":"https://enigmacamp.com/"},"version":"1.0"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/api/room":{"get":{"tags":["room-controller"],"operationId":"getAll","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"put":{"tags":["room-controller"],"operationId":"update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"post":{"tags":["room-controller"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/room-type":{"get":{"tags":["room-type-controller"],"operationId":"getAll_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"put":{"tags":["room-type-controller"],"operationId":"update_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomTypeUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"post":{"tags":["room-type-controller"],"operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomTypeCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/reservation/{id}/pay":{"put":{"tags":["reservation-controller"],"operationId":"pay","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/reservation/{id}/cancel":{"put":{"tags":["reservation-controller"],"operationId":"cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/payment/{id}/reject":{"put":{"tags":["payment-controller"],"operationId":"reject","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/payment/{id}/approve":{"put":{"tags":["payment-controller"],"operationId":"approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/facility":{"get":{"tags":["facility-controller"],"operationId":"getAll_4","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"put":{"tags":["facility-controller"],"operationId":"update_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"post":{"tags":["facility-controller"],"operationId":"create_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/customer":{"get":{"tags":["customer-controller"],"operationId":"getAll_5","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"put":{"tags":["customer-controller"],"operationId":"update_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/admin":{"get":{"tags":["admin-controller"],"operationId":"getAll_6","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"put":{"tags":["admin-controller"],"operationId":"update_4","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/reservation":{"get":{"tags":["reservation-controller"],"operationId":"getAll_2","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"null"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"post":{"tags":["reservation-controller"],"operationId":"create_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/auth/register/customer":{"post":{"tags":["auth-controller"],"operationId":"registerCustomer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterCustomerRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/auth/register/admin":{"post":{"tags":["auth-controller"],"operationId":"registerAdmin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAdminRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/auth/login":{"post":{"tags":["auth-controller"],"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/room/{id}":{"get":{"tags":["room-controller"],"operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"delete":{"tags":["room-controller"],"operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/room-type/{id}":{"get":{"tags":["room-type-controller"],"operationId":"getById_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"delete":{"tags":["room-type-controller"],"operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/reservation/{id}":{"get":{"tags":["reservation-controller"],"operationId":"getById_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/payment":{"get":{"tags":["payment-controller"],"operationId":"getAll_3","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"null"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/payment/{id}":{"get":{"tags":["payment-controller"],"operationId":"getById_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/payment/{id}/download":{"get":{"tags":["payment-controller"],"operationId":"download","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK"}},"security":[{"Bearer Authentication":[]}]}},"/api/facility/{id}":{"get":{"tags":["facility-controller"],"operationId":"getById_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]},"delete":{"tags":["facility-controller"],"operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/customer/{id}":{"get":{"tags":["customer-controller"],"operationId":"getById_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}},"/api/admin/{id}":{"get":{"tags":["admin-controller"],"operationId":"getById_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"Bearer Authentication":[]}]}}},"components":{"schemas":{"RoomUpdateRequest":{"required":["id","price","roomNumber","roomTypeId"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"roomTypeId":{"type":"integer","format":"int32"},"roomNumber":{"type":"integer","format":"int32"},"price":{"minimum":1,"type":"integer","format":"int64"}}},"RoomTypeUpdateRequest":{"required":["bedCount","bedType","facilitiesId","id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"bedType":{"type":"string"},"bedCount":{"minimum":1,"type":"integer","format":"int32"},"facilitiesId":{"type":"array","items":{"type":"integer","format":"int32"}}}},"FacilityUpdateRequest":{"required":["id","name"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"}}},"CustomerUpdateRequest":{"required":["address","email","id","identityNumber","name","phoneNumber"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"identityNumber":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"}}},"AdminUpdateRequest":{"required":["address","email","id","name","phoneNumber"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"address":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"}}},"RoomCreateRequest":{"required":["price","roomNumber","roomTypeId"],"type":"object","properties":{"roomTypeId":{"type":"integer","format":"int32"},"roomNumber":{"type":"integer","format":"int32"},"price":{"minimum":1,"type":"integer","format":"int64"}}},"RoomTypeCreateRequest":{"required":["bedCount","bedType","facilitiesId","name"],"type":"object","properties":{"name":{"type":"string"},"bedType":{"type":"string"},"bedCount":{"minimum":1,"type":"integer","format":"int32"},"facilitiesId":{"type":"array","items":{"type":"integer","format":"int32"}}}},"ReservationCreateRequest":{"required":["checkinDate","checkoutDate","customerId","roomId"],"type":"object","properties":{"roomId":{"type":"integer","format":"int32"},"customerId":{"type":"integer","format":"int32"},"checkinDate":{"type":"string"},"checkoutDate":{"type":"string"}}},"FacilityCreateRequest":{"required":["name"],"type":"object","properties":{"name":{"type":"string"}}},"RegisterCustomerRequest":{"required":["address","email","identityNumber","name","password","phoneNumber","username"],"type":"object","properties":{"username":{"type":"string"},"identityNumber":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"}}},"RegisterAdminRequest":{"required":["address","email","name","password","phoneNumber","username"],"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"phoneNumber":{"type":"string"},"email":{"type":"string"}}},"LoginRequest":{"required":["password","username"],"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}}}},"securitySchemes":{"Bearer Authentication":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}