From 41e490b29704e492d0df1702180a670302203971 Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Tue, 17 Feb 2026 16:58:59 +0000 Subject: [PATCH] PI-3866 Remove deprecated forenames field --- .../kotlin/uk/gov/justice/digital/hmpps/TierDetailsTest.kt | 4 ++-- .../justice/digital/hmpps/controller/model/PersonDetails.kt | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/tier-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/TierDetailsTest.kt b/projects/tier-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/TierDetailsTest.kt index d25e3cbe79..68692b70a8 100644 --- a/projects/tier-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/TierDetailsTest.kt +++ b/projects/tier-to-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/TierDetailsTest.kt @@ -4,9 +4,9 @@ import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.containsInAnyOrder import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc import org.springframework.boot.test.context.SpringBootTest import org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc import org.springframework.test.web.servlet.MockMvc import org.springframework.test.web.servlet.get import uk.gov.justice.digital.hmpps.data.generator.* @@ -44,7 +44,7 @@ class TierDetailsTest @Autowired constructor( .andExpect { status { is2xxSuccessful() } jsonPath("$.crn") { value("A000001") } - jsonPath("$.name.forenames") { value("Test") } + jsonPath("$.name.forename") { value("Test") } jsonPath("$.name.surname") { value("Person") } jsonPath("$.age") { value(18) } } diff --git a/projects/tier-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/model/PersonDetails.kt b/projects/tier-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/model/PersonDetails.kt index 231f815ba9..55c32d2162 100644 --- a/projects/tier-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/model/PersonDetails.kt +++ b/projects/tier-to-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/controller/model/PersonDetails.kt @@ -11,8 +11,6 @@ data class PersonDetails( data class Name( val forename: String, - @Deprecated("Use forename instead", ReplaceWith("forename")) - val forenames: String = forename, val middleName: String?, val surname: String )