{"openapi":"3.0.1","info":{"title":"'@project.name@'","description":"'@project.description@'","contact":{"name":"Joe Doe","email":"dumy@dumy"},"version":"'@project.version@'"},"servers":[{"url":"http://localhost:8080","description":"'@project.description@'"}],"paths":{"/api/complaint/{id}":{"get":{"tags":["complaint-controller"],"operationId":"getComplaintById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetComplaintDto"}}}}}},"put":{"tags":["complaint-controller"],"operationId":"putComplaintState","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutComplaintStateDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetComplaintDto"}}}}}}},"/api/complaint/append":{"put":{"tags":["complaint-controller"],"operationId":"appendComplaints","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutComplaintReportDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetComplaintDto"}}}}}}}},"/api/complaint":{"post":{"tags":["complaint-controller"],"operationId":"postComplaint","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PostComplaintDto"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GetComplaintDto"}}}}}}},"/ping":{"get":{"tags":["ping-controller"],"summary":"Check healthy of the app","description":"If the app it's alive response pong","operationId":"pong","responses":{"200":{"description":"Successful operation","content":{"*/*":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorApi"}}}}}}},"/api/complaint/types":{"get":{"tags":["complaint-controller"],"operationId":"getComplaintTypes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/complaint/states":{"get":{"tags":["complaint-controller"],"operationId":"getComplaintStates","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/complaint/state/{state}":{"get":{"tags":["complaint-controller"],"operationId":"getReducedComplaintsByState","parameters":[{"name":"state","in":"path","required":true,"schema":{"type":"string","enum":["NEW","PENDING","REJECTED","ATTACHED"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetReducedComplaintDto"}}}}}}}},"/api/complaint/report/{id}":{"get":{"tags":["complaint-controller"],"operationId":"getComplaintsByReport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetComplaintDto"}}}}}}}},"/api/complaint/plot/{plot}":{"get":{"tags":["complaint-controller"],"operationId":"getAllReducedComplaintsMatchingText","parameters":[{"name":"plot","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetReducedComplaintDto"}}}}}}}},"/api/complaint/dates":{"get":{"tags":["complaint-controller"],"operationId":"getReducedComplaintsBetweenDates","parameters":[{"name":"startDateTime","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"endDateTime","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetReducedComplaintDto"}}}}}}}},"/api/complaint/all":{"get":{"tags":["complaint-controller"],"operationId":"getAllReducedComplaints","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetReducedComplaintDto"}}}}}}}}},"components":{"schemas":{"PutComplaintStateDto":{"required":["complaintState","id","stateReason","userId"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int32"},"complaintState":{"type":"string","enum":["NEW","PENDING","REJECTED","ATTACHED"]},"stateReason":{"maxLength":50,"minLength":3,"type":"string"}}},"GetComplaintDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int32"},"reportId":{"type":"integer","format":"int32"},"complaintType":{"type":"string"},"complaintState":{"type":"string"},"description":{"type":"string"},"stateReason":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"createdUser":{"type":"integer","format":"int32"},"lastUpdatedDate":{"type":"string","format":"date-time"},"lastUpdatedUser":{"type":"integer","format":"int32"}}},"PutComplaintReportDto":{"required":["complaintIds","reportId","userId"],"type":"object","properties":{"reportId":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int32"},"complaintIds":{"type":"array","items":{"type":"integer","format":"int32"}}}},"PostComplaintDto":{"required":["complaintType","description","userId"],"type":"object","properties":{"userId":{"type":"integer","format":"int32"},"complaintType":{"type":"string","enum":["T1","T2","T3"]},"description":{"maxLength":800,"minLength":1,"type":"string"},"pictures":{"type":"array","items":{"type":"string","format":"binary"}}}},"ErrorApi":{"type":"object","properties":{"timestamp":{"type":"string"},"status":{"type":"integer","format":"int32"},"error":{"type":"string"},"message":{"type":"string"}}},"GetReducedComplaintDto":{"type":"object","properties":{"userId":{"type":"integer","format":"int32"},"reportId":{"type":"integer","format":"int32"},"complaintType":{"type":"string"},"complaintState":{"type":"string"},"description":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"fileQuantity":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"}}}}}}