{"openapi":"3.0.1","info":{"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"wa-case-event-handler Service","version":"v1.0.0"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/wa-case-event-handler"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"paths":{"/":{"get":{"operationId":"welcome","parameters":[{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"tags":["root-controller"]}},"/messages":{"post":{"operationId":"caseEventHandler","parameters":[{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInformation"}}},"required":true},"responses":{"204":{"content":{"*/*":{"schema":{"type":"object"}}},"description":"Message processed successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Handles the CCD case event message","tags":["case-event-handler-controller"]}},"/messages/jobs/{jobName}":{"post":{"description":"Query case event message db to find problematic messages by job name","operationId":"problemMessagesJob","parameters":[{"in":"path","name":"jobName","required":true,"schema":{"type":"string"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}},"description":"OK"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"tags":["problem-message-controller"]}},"/messages/query":{"get":{"operationId":"getMessagesByQueryParameters","parameters":[{"in":"query","name":"states","required":false,"schema":{"type":"string"}},{"in":"query","name":"case_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"event_timestamp","required":false,"schema":{"type":"string"}},{"in":"query","name":"from_dlq","required":false,"schema":{"type":"boolean"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseEventMessageEntity"}}},"description":"Messages returned successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Gets the case event message by messageId","tags":["case-event-handler-testing-controller"]}},"/messages/{message_id}":{"delete":{"operationId":"deleteMessageByMessageId","parameters":[{"in":"path","name":"message_id","required":true,"schema":{"type":"string"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Messages deleted successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Deletes the case event message by messageId","tags":["case-event-handler-testing-controller"]},"get":{"operationId":"getMessagesByMessageId","parameters":[{"in":"path","name":"message_id","required":true,"schema":{"type":"string"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/CaseEventMessageEntity"}}},"description":"Messages returned successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Gets the case event message by messageId","tags":["case-event-handler-testing-controller"]},"post":{"operationId":"postCaseEventHandlerMessage","parameters":[{"in":"path","name":"message_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"session_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"from_dlq","required":false,"schema":{"type":"boolean"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"content":{"*/*":{"schema":{"type":"object"}}},"description":"Message processed successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Handles the CCD case event message","tags":["case-event-handler-testing-controller"]},"put":{"operationId":"putCaseEventHandlerMessage","parameters":[{"in":"path","name":"message_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"session_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"from_dlq","required":true,"schema":{"type":"boolean"}},{"description":"Keyword `Bearer` followed by a service-to-service token for a whitelisted micro-service","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"content":{"*/*":{"schema":{"type":"object"}}},"description":"Message processed successfully"},"400":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"}},"summary":"Handles the CCD case event message","tags":["case-event-handler-testing-controller"]}}},"components":{"schemas":{"AdditionalData":{"type":"object","properties":{"Data":{"type":"object","additionalProperties":{"type":"object"},"writeOnly":true},"Definition":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"writeOnly":true},"data":{"type":"object","additionalProperties":{"type":"object"}},"definition":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"}}}},"CaseEventMessageEntity":{"type":"object","properties":{"caseId":{"type":"string"},"deliveryCount":{"type":"integer","format":"int32"},"eventTimestamp":{"type":"string","format":"date-time"},"fromDlq":{"type":"boolean"},"holdUntil":{"type":"string","format":"date-time"},"messageContent":{"type":"string"},"messageId":{"type":"string"},"messageProperties":{"$ref":"#/components/schemas/JsonNode"},"received":{"type":"string","format":"date-time"},"retryCount":{"type":"integer","format":"int32"},"sequence":{"type":"integer","format":"int64"},"state":{"type":"string","enum":["NEW","READY","PROCESSED","UNPROCESSABLE"]}}},"ErrorMessage":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer","format":"int32"},"timestamp":{"type":"string","format":"date-time"}}},"EventInformation":{"required":["caseId","caseTypeId","eventId","eventInstanceId","jurisdictionId","userId"],"type":"object","properties":{"AdditionalData":{"$ref":"#/components/schemas/AdditionalData"},"CaseId":{"type":"string","writeOnly":true},"CaseTypeId":{"type":"string","writeOnly":true},"EventId":{"type":"string","writeOnly":true},"EventInstanceId":{"type":"string","writeOnly":true},"EventTimeStamp":{"type":"string","format":"date-time","writeOnly":true},"JurisdictionId":{"type":"string","writeOnly":true},"NewStateId":{"type":"string","writeOnly":true},"PreviousStateId":{"type":"string","writeOnly":true},"UserId":{"type":"string","writeOnly":true},"additionalData":{"$ref":"#/components/schemas/AdditionalData"},"caseId":{"type":"string"},"caseTypeId":{"type":"string"},"eventId":{"type":"string"},"eventInstanceId":{"type":"string"},"eventTimeStamp":{"type":"string","format":"date-time"},"jurisdictionId":{"type":"string"},"newStateId":{"type":"string"},"previousStateId":{"type":"string"},"userId":{"type":"string"}}},"JobResponse":{"type":"object","properties":{"jobName":{"type":"string"},"messageIds":{"type":"array","items":{"type":"string"}},"numberOfMessages":{"type":"integer","format":"int32"}}},"JsonNode":{"type":"object"}}}}
