From df0cbf44d41a5c5885242561c97d8ab58be62b1f Mon Sep 17 00:00:00 2001 From: Arunima George Date: Mon, 30 Mar 2026 16:58:33 +0100 Subject: [PATCH] TD-7055: Changed the response format from Open API send email method. --- .../GovNotifyMessagingController.cs | 9 +-- .../SwaggerDefinitions/v1.3.0.json | 81 ++++++++++++++++++- 2 files changed, 83 insertions(+), 7 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs index e7600ff23..64afc8844 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/GovNotifyMessagingController.cs @@ -47,13 +47,12 @@ public async Task SendEmailAsync([FromBody] EmailRequest request) { var response = await this.govMessageService.SendEmailAsync(request); - if (!response.IsSuccess) - { - return this.BadRequest(new { error = response.ErrorMessage }); - } + ////if (!response.IsSuccess) + ////{ + //// return this.BadRequest(new { error = response.ErrorMessage }); + ////} return this.Ok(response); - } catch (Exception ex) { diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/SwaggerDefinitions/v1.3.0.json b/OpenAPI/LearningHub.Nhs.OpenApi/SwaggerDefinitions/v1.3.0.json index f2b287be6..95abc6405 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/SwaggerDefinitions/v1.3.0.json +++ b/OpenAPI/LearningHub.Nhs.OpenApi/SwaggerDefinitions/v1.3.0.json @@ -6174,8 +6174,6 @@ } } } - } - }, }, "/GovNotifyMessage/SendSms": { "post": { @@ -6293,6 +6291,85 @@ } } } + }, + "/GovNotifyMessage/GetMessageRequests/{page}/{pageSize}/{sortColumn}/{sortDirection}/{filter}": { + "post": { + "tags": [ + "GetMessageRequests" + ], + "parameters": [ + { + "name": "page", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortColumn", + "in": "path", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortDirection", + "in": "path", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "path", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/GovNotifyMessage/GetMessageRequestById/{id}": { + "post": { + "tags": [ + "GetMessageRequests" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } } }, "components": {