From f4da01bb888b378b72e1038c999bd54aa5e4c053 Mon Sep 17 00:00:00 2001 From: Dave A <168838504+daveawc@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:48:35 +0000 Subject: [PATCH] test commit --- .../hmpps/approvedpremisesapi/service/TaskService.kt | 2 +- src/main/resources/static/_shared.yml | 7 +++++-- src/main/resources/static/codegen/built-api-spec.yml | 7 +++++-- .../resources/static/codegen/built-cas1-api-spec.yml | 7 +++++-- .../resources/static/codegen/built-cas2-api-spec.yml | 7 +++++-- .../resources/static/codegen/built-cas3-api-spec.yml | 10 +++++++--- .../unit/service/TaskServiceTest.kt | 2 +- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/TaskService.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/TaskService.kt index a8630cfec6..97eae2b603 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/TaskService.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/TaskService.kt @@ -121,7 +121,7 @@ class TaskService( val allocatedFilter = filterCriteria.allocatedFilter - val isAllocated = allocatedFilter?.let { allocatedFilter == AllocatedFilter.allocated } + val isAllocated = allocatedFilter?.let { allocatedFilter == AllocatedFilter.ALLOCATED } val repoFunction = if (taskTypes.size == 1) { when (taskTypes[0]) { diff --git a/src/main/resources/static/_shared.yml b/src/main/resources/static/_shared.yml index e54ab656f6..7f20cca413 100644 --- a/src/main/resources/static/_shared.yml +++ b/src/main/resources/static/_shared.yml @@ -4848,8 +4848,11 @@ components: AllocatedFilter: type: string enum: - - allocated - - unallocated + - "allocated" + - "unallocated" + x-enum-varnames: + - ALLOCATED + - UNALLOCATED ApplicationSortField: type: string enum: diff --git a/src/main/resources/static/codegen/built-api-spec.yml b/src/main/resources/static/codegen/built-api-spec.yml index 9ed850bff1..0ffe3d820d 100644 --- a/src/main/resources/static/codegen/built-api-spec.yml +++ b/src/main/resources/static/codegen/built-api-spec.yml @@ -9179,8 +9179,11 @@ components: AllocatedFilter: type: string enum: - - allocated - - unallocated + - "allocated" + - "unallocated" + x-enum-varnames: + - ALLOCATED + - UNALLOCATED ApplicationSortField: type: string enum: diff --git a/src/main/resources/static/codegen/built-cas1-api-spec.yml b/src/main/resources/static/codegen/built-cas1-api-spec.yml index dfe92161ec..356ce47393 100644 --- a/src/main/resources/static/codegen/built-cas1-api-spec.yml +++ b/src/main/resources/static/codegen/built-cas1-api-spec.yml @@ -5960,8 +5960,11 @@ components: AllocatedFilter: type: string enum: - - allocated - - unallocated + - "allocated" + - "unallocated" + x-enum-varnames: + - ALLOCATED + - UNALLOCATED ApplicationSortField: type: string enum: diff --git a/src/main/resources/static/codegen/built-cas2-api-spec.yml b/src/main/resources/static/codegen/built-cas2-api-spec.yml index f9eff9ec84..c25559905e 100644 --- a/src/main/resources/static/codegen/built-cas2-api-spec.yml +++ b/src/main/resources/static/codegen/built-cas2-api-spec.yml @@ -5439,8 +5439,11 @@ components: AllocatedFilter: type: string enum: - - allocated - - unallocated + - "allocated" + - "unallocated" + x-enum-varnames: + - ALLOCATED + - UNALLOCATED ApplicationSortField: type: string enum: diff --git a/src/main/resources/static/codegen/built-cas3-api-spec.yml b/src/main/resources/static/codegen/built-cas3-api-spec.yml index 088e5295d5..37cf88791d 100644 --- a/src/main/resources/static/codegen/built-cas3-api-spec.yml +++ b/src/main/resources/static/codegen/built-cas3-api-spec.yml @@ -95,7 +95,8 @@ paths: 'application/problem+json': schema: $ref: '#/components/schemas/ValidationError' - + + components: responses: 401Response: @@ -4946,8 +4947,11 @@ components: AllocatedFilter: type: string enum: - - allocated - - unallocated + - "allocated" + - "unallocated" + x-enum-varnames: + - ALLOCATED + - UNALLOCATED ApplicationSortField: type: string enum: diff --git a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/TaskServiceTest.kt b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/TaskServiceTest.kt index 220610224c..9f9c18cc9d 100644 --- a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/TaskServiceTest.kt +++ b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/TaskServiceTest.kt @@ -387,7 +387,7 @@ class TaskServiceTest { val result = taskService.getAll( TaskService.TaskFilterCriteria( - AllocatedFilter.allocated, + AllocatedFilter.ALLOCATED, apAreaId, cruManagementAreaId, taskEntityTypes,