diff --git a/src/main/java/gov/cabinetoffice/gap/adminbackend/config/JacksonConfig.java b/src/main/java/gov/cabinetoffice/gap/adminbackend/config/JacksonConfig.java index 0107732a..bc604846 100644 --- a/src/main/java/gov/cabinetoffice/gap/adminbackend/config/JacksonConfig.java +++ b/src/main/java/gov/cabinetoffice/gap/adminbackend/config/JacksonConfig.java @@ -1,7 +1,9 @@ package gov.cabinetoffice.gap.adminbackend.config; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -19,7 +21,7 @@ public ObjectMapper getObjectMapper() { objectMapper.disable(DEFAULT_VIEW_INCLUSION); objectMapper.disable(FAIL_ON_UNKNOWN_PROPERTIES); objectMapper.registerModule(new JavaTimeModule()); + objectMapper.registerModule(new ParameterNamesModule(JsonCreator.Mode.PROPERTIES)); return objectMapper; } - }