Skip to content

Commit

Permalink
CCMSPUI-379 Added to open-api-specification.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie Briggs <jamie.briggs@digital.justice.gov.uk>
  • Loading branch information
Jamie Briggs committed Feb 11, 2025
1 parent 3ba9643 commit 22b183c
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
91 changes: 91 additions & 0 deletions data-api/open-api-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,67 @@ paths:
description: 'Forbidden'
'500':
description: 'Internal server error'
/clients:
get:
tags:
- clients
summary: 'Get Clients'
operationId: 'getClients'
x-spring-paginated: true
parameters:
- name: 'first-name'
in: 'query'
schema:
type: 'string'
example: 'john'
- name: 'surname'
in: 'query'
schema:
type: 'string'
example: 'smith'
- name: 'date-of-birth'
in: 'query'
schema:
type: 'string'
example: "2017-01-01"
format: date
- name: 'gender'
in: 'query'
schema:
type: 'string'
example: 'Male'
- name: 'case-reference-number'
in: 'query'
schema:
type: 'string'
example: '1234567890'
- name: 'home-office-reference'
in: 'query'
schema:
type: 'string'
example: '1234567890'
- name: 'national-insurance-number'
in: 'query'
schema:
type: 'string'
example: 'AB123456C'
responses:
'200':
description: 'Successful operation'
content:
application/json:
schema:
$ref: "#/components/schemas/clientDetails"
'400':
description: 'Bad request'
'401':
description: 'Unauthorized'
'403':
description: 'Forbidden'
'404':
description: 'Not found'
'500':
description: 'Internal server error'
/clients/status/{transaction-request-id}:
get:
tags:
Expand Down Expand Up @@ -1502,6 +1563,36 @@ components:
type: 'string'
default_code:
type: 'string'
clientDetails:
allOf:
- $ref: "#/components/schemas/page"
type: 'object'
properties:
content:
type: 'array'
default: [ ]
items:
$ref: "#/components/schemas/clientSummary"
clientSummary:
allOf:
- $ref: '#/components/schemas/baseClient'
type: 'object'
properties:
surname_at_birth:
type: 'string'
full_name:
type: 'string'
date_of_birth:
type: 'string'
format: 'date'
gender:
type: 'string'
postal_code:
type: 'string'
home_office_reference:
type: 'string'
national_insurance_number:
type: 'string'
baseClient:
type: 'object'
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package uk.gov.laa.ccms.data.controller;

import java.time.LocalDate;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import uk.gov.laa.ccms.data.api.ClientsApi;
import uk.gov.laa.ccms.data.model.ClientDetails;
import uk.gov.laa.ccms.data.model.TransactionStatus;
import uk.gov.laa.ccms.data.service.ClientService;
import uk.gov.laa.ccms.data.service.ClientServiceException;
Expand Down Expand Up @@ -44,4 +47,11 @@ public ResponseEntity<TransactionStatus> getClientTransactionStatus(String trans
return ResponseEntity.internalServerError().build();
}
}

@Override
public ResponseEntity<ClientDetails> getClients(String firstName, String surname,
LocalDate dateOfBirth, String gender, String caseReferenceNumber, String homeOfficeReference,
String nationalInsuranceNumber, Pageable pageable) {
return null;
}
}

0 comments on commit 22b183c

Please sign in to comment.