From f4fbed39cc737ea635bc579572db656c9abd4b29 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Wed, 17 Apr 2024 15:29:23 +0200 Subject: [PATCH] Replace Extensions class with JsonNode in PdlPersonBolk The commit includes changes in the PdlPersonBolk domain where the 'Extensions' class has been replaced with 'JsonNode'. It also removed some unused import statements. The use of JsonNode simplifies the class structure and enhances the flexibility in handling the 'extensions' data in this domain class. --- .../no/nav/dolly/domain/PdlPersonBolk.java | 36 ++----------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/PdlPersonBolk.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/PdlPersonBolk.java index 61c1e4f1c74..081c322ee18 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/PdlPersonBolk.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/PdlPersonBolk.java @@ -1,15 +1,13 @@ package no.nav.dolly.domain; +import com.fasterxml.jackson.databind.JsonNode; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.ArrayList; import java.util.List; -import static java.util.Objects.isNull; - @Data @Builder @NoArgsConstructor @@ -17,7 +15,7 @@ public class PdlPersonBolk { private Data data; - private Extensions extensions; + private JsonNode extensions; @lombok.Data @Builder @@ -30,36 +28,6 @@ public static class Data { private List hentIdenterBolk; } - @lombok.Data - @Builder - @NoArgsConstructor - @AllArgsConstructor - public static class Extensions { - - private List warnings; - - public List getWarnings() { - - if (isNull(warnings)) { - warnings = new ArrayList<>(); - } - return warnings; - } - } - - @lombok.Data - @Builder - @NoArgsConstructor - @AllArgsConstructor - public static class Warning { - - private String code; - private String details; - private String id; - private String message; - private String query; - } - @lombok.Data @Builder @NoArgsConstructor