Skip to content

Commit

Permalink
CCMSPUI-453: Implement Get Notifications Endpoint (#122)
Browse files Browse the repository at this point in the history
* Added reference summary to open-api-specification.yml

Signed-off-by: Jamie Briggs <[email protected]>

* Added CaseReferenceController and NewCaseReferenceRepository

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Added CaseReferenceSummaryMapper and further tests

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Removed CaseReferenceSummaryMapper.java

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-378: Fixed checkstyle issue in NewCaseReferenceService

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Work towards endpoint and NotificationsMapper including mapping XML values

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Fix to NotificationsMapper when XML is empty

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Fixes to codestyle violations

Signed-off-by: Jamie Briggs <[email protected]>

* Started on IT for NotificationRepository

Signed-off-by: Jamie Briggs <[email protected]>

* Added NotificationSpecification to help with filtering Notification entities in NotificationRepository

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: Tweaks to open-api-specification.yml, and NotificationControllerTests

Signed-off-by: Jamie Briggs <[email protected]>

* CCMSPUI-453: NotificationServiceTest and additional JavaDoc

Signed-off-by: Jamie Briggs <[email protected]>

---------

Signed-off-by: Jamie Briggs <[email protected]>
  • Loading branch information
JamieBriggs-MoJ authored Dec 19, 2024
1 parent 339f6ed commit 208aac7
Show file tree
Hide file tree
Showing 22 changed files with 1,753 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ test-results/
.idea

/.java-version

# Project
data-api/src/main/resources/application-secret.yml
data-service/src/main/resources/application-secret.yml
175 changes: 175 additions & 0 deletions data-api/open-api-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,78 @@ paths:
description: 'Forbidden'
'500':
description: 'Internal server error'
/notifications:
get:
tags:
- notifications
summary: 'Get Notifications'
operationId: 'getNotifications'
x-spring-paginated: true
parameters:
- name: 'case-reference-number'
in: 'query'
schema:
type: 'string'
example: '1234567890'
- name: 'provider-case-reference'
in: 'query'
schema:
type: 'string'
example: "1234567890"
- name: 'assigned-to-user-id'
in: 'query'
schema:
type: 'string'
example: 'abc123'
- name: 'client-surname'
in: 'query'
schema:
type: 'string'
example: 'smith'
- name: 'fee-earner-id'
in: 'query'
schema:
type: 'integer'
example: 1234567890
- name: 'include-closed'
in: 'query'
schema:
type: boolean
default: true
- name: 'notification-type'
in: 'query'
schema:
type: 'string'
example: 'A'
- name: 'date-from'
in: 'query'
schema:
type: 'string'
example: "2017-01-01"
format: date
- name: 'date-to'
in: 'query'
schema:
type: 'string'
example: "2017-01-01"
format: date
responses:
'200':
description: 'Successful operation'
content:
application/json:
schema:
$ref: "#/components/schemas/notifications"
'400':
description: 'Bad request'
'401':
description: 'Unauthorized'
'403':
description: 'Forbidden'
'404':
description: 'Not found'
'500':
description: 'Internal server error'

components:
securitySchemes:
Expand Down Expand Up @@ -1577,6 +1649,109 @@ components:
properties:
case_reference_number:
type: 'string'
notifications:
allOf:
- $ref: "#/components/schemas/page"
type: object
properties:
content:
type: array
default: [ ]
items:
$ref: '#/components/schemas/notification'
notification:
type: 'object'
properties:
#client_reference_number:
# type: 'string'
case_reference_number:
type: 'string'
provider_case_reference_number:
type: 'string'
user:
$ref: '#/components/schemas/userDetail'
client_name:
type: 'string'
category_of_law:
type: 'string'
fee_earner:
type: 'string'
notification_id:
type: 'string'
provider_firm_id:
type: 'string'
subject:
type: 'string'
assign_date:
type: 'string'
format: date
due_date:
type: 'string'
format: date
notification_type:
type: 'string'
status:
type: 'string'
notes:
type: 'array'
items:
$ref: '#/components/schemas/note'
evidence_allowed:
type: 'boolean'
notification_open_indicator:
type: 'boolean'
attached_documents:
type: 'array'
items:
$ref: '#/components/schemas/document'
uploaded_documents:
type: 'array'
items:
$ref: '#/components/schemas/document'
available_responses:
type: array
items:
type: 'string'
note:
type: 'object'
properties:
notes_id:
type: 'string'
user:
$ref: '#/components/schemas/userDetail'
date:
type: 'string'
format: date
message:
type: 'string'
baseDocument:
type: 'object'
properties:
document_type:
type: 'string'
file_extension:
type: 'string'
text:
type: 'string'
document:
allOf:
- $ref: "#/components/schemas/baseDocument"
type: 'object'
properties:
document_id:
type: 'string'
title:
type: 'string'
channel:
type: 'string'
document_link:
type: 'string'
file_data:
type: 'string'
status:
type: 'string'
status_description:
type: 'string'
page:
type: 'object'
properties:
Expand Down
2 changes: 2 additions & 0 deletions data-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dependencies {
implementation 'org.mapstruct:mapstruct:1.6.3'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'

implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
Expand Down
Loading

0 comments on commit 208aac7

Please sign in to comment.