From 182d633e77a3c6b6bd6cb66bfd7581ff99a590dd Mon Sep 17 00:00:00 2001 From: DeclanClarkeCGI <142809814+DeclanClarkeCGI@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:35:32 +0000 Subject: [PATCH] remove required status from nullable fields in json schema (#696) --- .../controllers/DraftAccountControllerIntegrationTest.java | 2 +- src/main/resources/jsonSchemas/account.json | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/integrationTest/java/uk/gov/hmcts/opal/controllers/DraftAccountControllerIntegrationTest.java b/src/integrationTest/java/uk/gov/hmcts/opal/controllers/DraftAccountControllerIntegrationTest.java index c3c44d64..49a741bd 100644 --- a/src/integrationTest/java/uk/gov/hmcts/opal/controllers/DraftAccountControllerIntegrationTest.java +++ b/src/integrationTest/java/uk/gov/hmcts/opal/controllers/DraftAccountControllerIntegrationTest.java @@ -665,7 +665,7 @@ void testPostDraftAccount_trap400Response() throws Exception { String expectedErrorMessageStart = "JSON Schema Validation Error: Validating against JSON schema 'addDraftAccountRequest.json'," - + " found 16 validation errors:"; + + " found 14 validation errors:"; when(userStateService.checkForAuthorisedUser(any())).thenReturn(allPermissionsUser()); diff --git a/src/main/resources/jsonSchemas/account.json b/src/main/resources/jsonSchemas/account.json index 657cffe7..79e2bc68 100644 --- a/src/main/resources/jsonSchemas/account.json +++ b/src/main/resources/jsonSchemas/account.json @@ -10,8 +10,6 @@ "originator_name", "originator_id", "enforcement_court_id", - "collection_order_made", - "collection_order_made_today", "payment_card_request", "account_sentence_date", "defendant", @@ -209,7 +207,6 @@ }, "debtor_detail": { "type": ["object", "null"], - "required": ["document_language", "hearing_language"], "properties": { "vehicle_make": { "type": ["string", "null"],