Skip to content

Commit

Permalink
CCMSPUI-530 Updated open-api-specification to include new get notific…
Browse files Browse the repository at this point in the history
…ation endpoint and added Notification schema for holding more data

Signed-off-by: Jamie Briggs <jamie.briggs@digital.justice.gov.uk>
  • Loading branch information
Jamie Briggs committed Feb 4, 2025
1 parent c4ef4fb commit d375841
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
39 changes: 38 additions & 1 deletion data-api/open-api-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,37 @@ 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'
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 @@ -1864,6 +1894,13 @@ components:
type: 'string'
notification_open_indicator:
type: 'boolean'
notification:
allOf:
- $ref: "#/components/schemas/notificationInfo"
type: object
properties:
docs:
type: 'string'
note:
type: 'object'
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import uk.gov.laa.ccms.data.api.NotificationsApi;
import uk.gov.laa.ccms.data.model.Notification;
import uk.gov.laa.ccms.data.model.NotificationSummary;
import uk.gov.laa.ccms.data.model.Notifications;
import uk.gov.laa.ccms.data.service.NotificationService;
Expand All @@ -30,6 +31,11 @@ public class NotificationsController implements NotificationsApi {

private final NotificationService notificationService;

@Override
public ResponseEntity<Notification> getNotification(Long notificationId) {
return null;
}

/**
* Retrieves a list of notifications based on various search criteria.
*
Expand Down

0 comments on commit d375841

Please sign in to comment.