{"openapi":"3.0.0","info":{"version":"1.0.0","title":"ABC API","description":"Esta aplicación permite obtener información de servicio al cliente de los concesionarios","contact":{"name":"Sergio Silva","url":"htttp://www.sergiosilva.com","email":"sc.silva155@uniandes.edu.co"}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/sergiok1000o/ABC/1.0.0"},{"description":"ABC server","url":"https://www.abc.com/api"}],"paths":{"/tickets":{"get":{"description":"Returns list of tickets","summary":"Returns list of tickets","parameters":[{"in":"query","name":"initial_date","required":false,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"string","example":"2020-06-01"}},{"in":"query","name":"final_date","required":false,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"string","example":"2020-07-20"}},{"in":"query","name":"status","required":false,"allowEmptyValue":true,"description":"status identifier","schema":{"type":"number","example":2}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"code":{"type":"number","example":200},"error":{"type":"boolean","example":false},"message":{"type":"string","example":""},"data":{"type":"array","items":{"$ref":"#/components/schemas/ticket"}}}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotFoundError"}}}}}}},"post":{"description":"Creates a ticket","summary":"Creates a ticket","parameters":[{"in":"query","name":"user","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"string","example":"Sergio Silva"}},{"in":"query","name":"contact","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"number","example":3012345678}},{"in":"query","name":"type","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"string","example":"contacto"}},{"in":"query","name":"description","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"string","example":"Desearía conocer cual es el costo del Tesla model 3"}},{"in":"query","name":"status","required":true,"allowEmptyValue":true,"description":"status identifier","schema":{"type":"number","example":2}}],"responses":{"200":{"description":"Successful request","content":{"application/json":{"schema":{"type":"array","items":{"properties":{"code":{"type":"number","example":200},"error":{"type":"boolean","example":false},"message":{"type":"string","example":""},"data":{"type":"array","items":{"$ref":"#/components/schemas/ticket"}}}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InternalServerError"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotFoundError"}}}}}}}},"/tickets/{id}":{"get":{"description":"Returns tickets based on ID","summary":"Find tickets by ID","operationId":"getTicketsById","parameters":[{"in":"path","name":"id","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"number","example":365}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ticket"}}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}},"patch":{"description":"Updates ticket answer based on ID","summary":"Updates ticket answer by ID","operationId":"patchTicketById","parameters":[{"in":"path","name":"id","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"number","example":365}},{"in":"query","name":"status","required":true,"allowEmptyValue":true,"description":"ticket status","schema":{"type":"string","example":"closed"}},{"in":"query","name":"answer","required":true,"allowEmptyValue":false,"description":"ticket answer","schema":{"type":"string","example":"El costo del tesla model 3 es $56,990 dolares."}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ticketClosed"}}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}},"delete":{"description":"Deletes ticket based on ID","summary":"Deletes ticket by ID","operationId":"deleteTicketById","parameters":[{"in":"path","name":"id","required":true,"allowEmptyValue":true,"description":"ticket identifier","schema":{"type":"number","example":123}}],"responses":{"200":{"description":"pet response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ticketDeleted"}}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}}},"components":{"schemas":{"ticket":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":365,"xml":{"attribute":true}},"user":{"type":"string","example":"Sergio Silva"},"contact":{"type":"number","example":3012345678},"status":{"type":"string","example":"open"},"type":{"type":"string","example":"consulta","xml":{"name":"selection"}},"description":{"type":"string","example":"Desearía conocer cual es el costo del Tesla model 3","xml":{"name":"description"}},"answer":{"type":"string","example":"","xml":{"name":"ans"}},"requires_appointent":{"type":"boolean","example":false,"xml":{"name":"appointment"}},"date_appointment":{"type":"string","format":"date","example":"","xml":{"name":"date_appointment"}}},"xml":{"name":"ticket"}},"ticketClosed":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":365,"xml":{"attribute":true}},"user":{"type":"string","example":"Sergio Silva"},"contact":{"type":"number","example":3012345678},"status":{"type":"string","example":"closed"},"type":{"type":"string","example":"consulta","xml":{"name":"selection"}},"description":{"type":"string","example":"Desearía conocer cual es el costo del Tesla model 3","xml":{"name":"description"}},"answer":{"type":"string","example":"El costo del tesla model 3 es $56,990 dolares.","xml":{"name":"ans"}},"requires_appointent":{"type":"boolean","example":false,"xml":{"name":"appointment"}},"date_appointment":{"type":"string","format":"date","example":"","xml":{"name":"date_appointment"}}},"xml":{"name":"ticket"}},"ticketDeleted":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":365,"xml":{"attribute":true}},"user":{"type":"string","example":"Sergio Silva"},"contact":{"type":"number","example":3012345678},"status":{"type":"string","example":"deleted"},"type":{"type":"string","example":"consulta","xml":{"name":"selection"}},"description":{"type":"string","example":"Desearía conocer cual es el costo del Tesla model 3","xml":{"name":"description"}},"answer":{"type":"string","example":"El ticket ha sido cancelado por el usuario.","xml":{"name":"ans"}},"requires_appointent":{"type":"boolean","example":false,"xml":{"name":"appointment"}},"date_appointment":{"type":"string","format":"date","example":"","xml":{"name":"date_appointment"}}},"xml":{"name":"ticket"}},"NotFoundError":{"type":"object","properties":{"code":{"type":"number","example":404},"error":{"type":"boolean","example":true},"message":{"type":"string","example":"Content not found"},"data":{"type":"string","example":{}}}},"InternalServerError":{"type":"object","properties":{"code":{"type":"number","example":500},"error":{"type":"boolean","example":true},"message":{"type":"string","example":"Internal server error"},"data":{"type":"string","example":{}}}}},"parameters":{"skipParam":{"name":"skip","in":"query","description":"number of items to skip","required":true,"schema":{"type":"integer","format":"int32"}},"limitParam":{"name":"limit","in":"query","description":"max records to return","required":true,"schema":{"type":"integer","format":"int32"}}}}}