Skip to content

Commit

Permalink
CCMSPUI-530 Implement GetNotification endpoint on EBS API (#147)
Browse files Browse the repository at this point in the history
* CCMSPUI-529 Made provider-id mandatory for notification search
* CCMSPUI-529 Made provider case reference and surname case-insensitive for notification search
* CCMSPUI-529 Modified Notification and Refactored into NotificationInfo
* CCMSPUI-529 Fixes to tests
* CCMSPUI-529 Fixes to tests and removed XML mappings
* CCMSPUI-529 Fixed NotificationSearchRepository filter SQL method
* CCMSPUI-529 Removed dead code
* CCMSPUI-529 Refactored NotificationSearchRepositoryIntegrationTest to use Oracle-Free instead of embedded H2 DB
* CCMSPUI-529 Added BooleanStringConverterTest
* CCMSPUI-530 Updated open-api-specification to include new get notification endpoint and added Notification schema for holding more data
* CCMSPUI-530 Added new entities for notes, documents, attachments and actions
* CCMSPUI-530 Started on NotificationRepositoryIntegrationTest
* CCMSPUI-530 Completed NotificationRepositoryIntegrationTest
* CCMSPUI-530 Fixes to integration tests
* CCMSPUI-530 Created various mappers for mapping document entity for presentation layer
* CCMSPUI-530 Finished mapper tests
* CCMSPUI-530 Finished controller and service tests
* CCMSPUI-530 Completed JavaDocs
* CCMSPUI-530 Added title to DocumentMapper when mapping title
* CCMSPUI-530 Added provider id to request params to secure get notification endpoint
* CCMSPUI-530 Added evidence allowed to notification info response
* CCMSPUI-530 Moved evidence allowed to correct schema in open-api-specification.yml
* CCMSPUI-530 Update to method names
* CCMSPUI-530 updated Notification Note to return time along with date
* CCMSPUI-530 fixed NotificationRepositoryIntegrationTest
* CCMSPUI-379 Adding missing sort statement to NotificationSearchRepository
* CCMSPUI-530 Checkstyle fixes
* CCMSPUI-530 Added evidence allowed to NotificationInfo and NotificationMapper
* CCMSPUI-530 Fix to NotificationSearchRepositoryIntegrationTest
---------
Signed-off-by: Jamie Briggs <jamie.briggs@digital.justice.gov.uk>
  • Loading branch information
Jamie Briggs authored Feb 17, 2025
1 parent 3ba9643 commit 64c53d1
Show file tree
Hide file tree
Showing 50 changed files with 2,140 additions and 1,245 deletions.
2 changes: 2 additions & 0 deletions data-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ openApiGenerate {
annotationLibrary : "swagger2",
useSpringBoot3 : "true"
]
typeMappings = ["DateTime": "LocalDateTime"]
importMappings = ["LocalDateTime": "java.time.LocalDateTime"]
}

compileJava.dependsOn 'openApiGenerate'
Expand Down
72 changes: 60 additions & 12 deletions data-api/open-api-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,13 @@ paths:
operationId: 'getNotifications'
x-spring-paginated: true
parameters:
- name: 'provider-id'
in: 'query'
required: true
schema:
type: 'integer'
format: 'int64'
example: '123456789'
- name: 'case-reference-number'
in: 'query'
schema:
Expand Down Expand Up @@ -1170,7 +1177,44 @@ paths:
description: 'Not found'
'500':
description: 'Internal server error'

/notifications/{notification-id}:
get:
tags:
- notifications
summary: 'Get Notification'
operationId: 'getNotification'
parameters:
- name: 'notification-id'
in: 'path'
required: true
schema:
type: 'integer'
format: 'int64'
example: '123456789'
- name: 'provider-id'
in: 'query'
required: true
schema:
type: 'integer'
format: 'int64'
example: '123456789'
responses:
'200':
description: 'Successful operation'
content:
application/json:
schema:
$ref: "#/components/schemas/notification"
'400':
description: 'Bad request'
'401':
description: 'Unauthorized'
'403':
description: 'Forbidden'
'404':
description: 'Not found'
'500':
description: 'Internal server error'
components:
securitySchemes:
ApiKeyAuth:
Expand Down Expand Up @@ -1825,12 +1869,10 @@ components:
type: array
default: [ ]
items:
$ref: '#/components/schemas/notification'
notification:
$ref: '#/components/schemas/notificationInfo'
notificationInfo:
type: 'object'
properties:
#client_reference_number:
# type: 'string'
case_reference_number:
type: 'string'
provider_case_reference_number:
Expand All @@ -1839,8 +1881,6 @@ components:
$ref: '#/components/schemas/userDetail'
client_name:
type: 'string'
category_of_law:
type: 'string'
fee_earner:
type: 'string'
notification_id:
Expand All @@ -1859,14 +1899,22 @@ components:
type: 'string'
status:
type: 'string'
notification_open_indicator:
type: 'boolean'
evidence_allowed:
type: 'boolean'

notification:
allOf:
- $ref: "#/components/schemas/notificationInfo"
type: object
properties:
evidence_allowed:
type: 'boolean'
notes:
type: 'array'
items:
$ref: '#/components/schemas/note'
evidence_allowed:
type: 'boolean'
notification_open_indicator:
type: 'boolean'
attached_documents:
type: 'array'
items:
Expand All @@ -1888,7 +1936,7 @@ components:
$ref: '#/components/schemas/userDetail'
date:
type: 'string'
format: date
format: date-time
message:
type: 'string'
baseDocument:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@Testcontainers
@DirtiesContext
public interface IntegrationTestInterface {
public interface OracleIntegrationTestInterface {

OracleContainerSingleton oracleContainerSingleton = OracleContainerSingleton.getInstance();

Expand Down
Loading

0 comments on commit 64c53d1

Please sign in to comment.