{"openapi":"3.1.0","info":{"description":"pt api","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"title":"pt api","version":"v0.0.1"},"externalDocs":{"description":"README","url":"https://github.com/hmcts/pt-api"},"servers":[{"url":"http://localhost","description":"Generated server url"}],"paths":{"/":{"get":{"operationId":"welcome","responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}},"description":"OK"}},"tags":["root-controller"]}},"/applications":{"get":{"description":"Returns all cases where the authenticated user is linked","operationId":"getCasesForUser","parameters":[{"description":"Bearer token for user authentication","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"description":"Service-to-Service (S2S) authorization token","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDto"}}}},"description":"Cases retrieved successfully"},"401":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDto"}}}},"description":"Invalid access token"},"403":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDto"}}}},"description":"Invalid Service Authorization"},"500":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDto"}}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationDto"}}}},"description":"Service temporarily unavailable"}},"security":[{"AuthorizationToken":[]},{"ServiceAuthorization":[]}],"summary":"Get all the cases related to authenticated citizen","tags":["application-controller"]}},"/applications/{caseReference}":{"get":{"description":"Returns case for the case reference","operationId":"getCaseByCaseReference","parameters":[{"description":"Bearer token for user authentication","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"description":"Service-to-Service (S2S) authorization token","in":"header","name":"ServiceAuthorization","required":true,"schema":{"type":"string"}},{"in":"path","name":"caseReference","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Case retrieved successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Invalid case reference"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Invalid access token"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Invalid Service Authorization"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Internal server error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationDto"}}},"description":"Service temporarily unavailable"}},"security":[{"AuthorizationToken":[]},{"ServiceAuthorization":[]}],"summary":"Get case for the case reference","tags":["application-controller"]}}},"components":{"schemas":{"ApplicationDto":{"type":"object","properties":{"applicantFirstName":{"type":"string"},"applicantIdamUserId":{"type":"string","format":"uuid"},"applicantLastName":{"type":"string"},"applicationType":{"type":"string","enum":["challengeRentIncrease","challengeExcessiveRent"]},"caseReference":{"type":"integer","format":"int64"},"createdDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"postcode":{"type":"string"}}}},"securitySchemes":{"AuthorizationToken":{"bearerFormat":"JWT","in":"header","name":"Authorization","scheme":"bearer","type":"http"}}}}
