Skip to content

Commit 3700f9c

Browse files
committed
CDPS-1054: Fixed json subtype reference to name it the enum value.
1 parent 1441159 commit 3700f9c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/dto/request/CorePersonRecordV1UpdateRequestDto.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import java.time.LocalDate
1515
visible = true,
1616
)
1717
@JsonSubTypes(
18-
JsonSubTypes.Type(value = BirthplaceUpdateDto::class),
19-
JsonSubTypes.Type(value = CountryOfBirthUpdateDto::class),
20-
JsonSubTypes.Type(value = DateOfBirthUpdateDto::class),
18+
JsonSubTypes.Type(name = "BIRTHPLACE", value = BirthplaceUpdateDto::class),
19+
JsonSubTypes.Type(name = "COUNTRY_OF_BIRTH", value = CountryOfBirthUpdateDto::class),
20+
JsonSubTypes.Type(name = "DATE_OF_BIRTH", value = DateOfBirthUpdateDto::class),
2121
)
2222
@Schema(description = "Core Person Record V1 update request base")
2323
sealed class CorePersonRecordV1UpdateRequestDto {

src/test/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/corepersonrecord/resource/CorePersonRecordV1ResourceIntTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ class CorePersonRecordV1ResourceIntTest : IntegrationTestBase() {
166166
val VALID_PATCH_REQUEST_BODY =
167167
// language=json
168168
"""
169-
{
169+
{
170170
"fieldName": "BIRTHPLACE",
171-
"fieldValue": "London"
171+
"value": "London"
172172
}
173173
""".trimIndent()
174174

0 commit comments

Comments
 (0)