Skip to content

Commit

Permalink
Replace Extensions class with JsonNode in PdlPersonBolk
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
krharum committed Apr 17, 2024
1 parent 66974bf commit f4fbed3
Showing 1 changed file with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
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
@AllArgsConstructor
public class PdlPersonBolk {

private Data data;
private Extensions extensions;
private JsonNode extensions;

@lombok.Data
@Builder
Expand All @@ -30,36 +28,6 @@ public static class Data {
private List<IdenterBolk> hentIdenterBolk;
}

@lombok.Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class Extensions {

private List<Warning> warnings;

public List<Warning> 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
Expand Down

0 comments on commit f4fbed3

Please sign in to comment.