You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/dto/request/CorePersonRecordV1UpdateRequestDto.kt
+23-1
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ import java.time.LocalDate
16
16
JsonSubTypes.Type(name =CorePersonRecordV1UpdateRequestDto.BIRTHPLACE, value =BirthplaceUpdateDto::class),
17
17
JsonSubTypes.Type(name =CorePersonRecordV1UpdateRequestDto.COUNTRY_OF_BIRTH, value =CountryOfBirthUpdateDto::class),
18
18
JsonSubTypes.Type(name =CorePersonRecordV1UpdateRequestDto.DATE_OF_BIRTH, value =DateOfBirthUpdateDto::class),
19
+
JsonSubTypes.Type(name =CorePersonRecordV1UpdateRequestDto.NATIONALITY, value =NationalityUpdateDto::class),
19
20
)
20
21
@Schema(description ="Core Person Record V1 update request base")
21
22
sealedclassCorePersonRecordV1UpdateRequestDto {
@@ -26,6 +27,7 @@ sealed class CorePersonRecordV1UpdateRequestDto {
26
27
constvalBIRTHPLACE="BIRTHPLACE"
27
28
constvalCOUNTRY_OF_BIRTH="COUNTRY_OF_BIRTH"
28
29
constvalDATE_OF_BIRTH="DATE_OF_BIRTH"
30
+
constvalNATIONALITY="NATIONALITY"
29
31
}
30
32
}
31
33
@@ -73,7 +75,7 @@ data class DateOfBirthUpdateDto(
73
75
@Schema(description ="Core Person Record V1 country of birth update request")
74
76
data classCountryOfBirthUpdateDto(
75
77
@Schema(
76
-
description ="The new value for the country of brith field",
78
+
description ="The new value for the country of birth field",
77
79
example ="UK",
78
80
required =true,
79
81
nullable =true,
@@ -89,3 +91,23 @@ data class CountryOfBirthUpdateDto(
89
91
)
90
92
overrideval fieldName:String=COUNTRY_OF_BIRTH
91
93
}
94
+
95
+
@Schema(description ="Core Person Record V1 nationality update request")
96
+
data classNationalityUpdateDto(
97
+
@Schema(
98
+
description ="The new value for the nationality field",
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/service/CorePersonRecordService.kt
Copy file name to clipboardexpand all lines: src/test/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/resource/CorePersonRecordV1ResourceIntTest.kt
+38
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,26 @@ class CorePersonRecordV1ResourceIntTest : IntegrationTestBase() {
68
68
.exchange()
69
69
.expectStatus().isNoContent
70
70
}
71
+
72
+
@Test
73
+
fun`can patch core person record nationality by prisoner number`() {
Copy file name to clipboardexpand all lines: src/test/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/service/CorePersonRecordServiceTest.kt
Copy file name to clipboardexpand all lines: src/test/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/integration/wiremock/PrisonApiMockServer.kt
0 commit comments