diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/operations/famopeserind_utils/FamOpeSerIndUtils.java b/src/main/java/fr/insee/rmes/bauhaus_services/operations/famopeserind_utils/FamOpeSerIndUtils.java index 139bd9856..16e326331 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/operations/famopeserind_utils/FamOpeSerIndUtils.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/operations/famopeserind_utils/FamOpeSerIndUtils.java @@ -47,6 +47,16 @@ public IdLabelTwoLangs buildIdLabelTwoLangsFromJson(JSONObject jsonFamOpeSer) { if(jsonFamOpeSer.has(Constants.LABEL_LG2)) { idLabelTwoLangs.setLabelLg2(jsonFamOpeSer.getString(Constants.LABEL_LG2)); } + if(jsonFamOpeSer.has(Constants.CREATORS)) { + List stringList = new ArrayList<>(); + for (int i = 0; i < jsonFamOpeSer.getJSONArray(Constants.CREATORS).length(); i++) { + Object element = jsonFamOpeSer.getJSONArray(Constants.CREATORS).get(i); + if (element instanceof String) { + stringList.add((String) element); + } + } + idLabelTwoLangs.setCreators(stringList); + } return idLabelTwoLangs; } diff --git a/src/main/java/fr/insee/rmes/config/swagger/model/IdLabelTwoLangs.java b/src/main/java/fr/insee/rmes/config/swagger/model/IdLabelTwoLangs.java index c3c048a0e..85e2f62c2 100644 --- a/src/main/java/fr/insee/rmes/config/swagger/model/IdLabelTwoLangs.java +++ b/src/main/java/fr/insee/rmes/config/swagger/model/IdLabelTwoLangs.java @@ -2,6 +2,8 @@ import io.swagger.v3.oas.annotations.media.Schema; +import java.util.List; + public class IdLabelTwoLangs { private static String classLink = "fr.insee.rmes.config.swagger.model.IdLabelTwoLangs"; @@ -15,6 +17,9 @@ public class IdLabelTwoLangs { @Schema(description = "Label lg2") public String labelLg2; + @Schema(description = "Creators") + private List creators; + public IdLabelTwoLangs(String id, String labelLg1, String labelLg2) { super(); this.id = id; @@ -54,4 +59,11 @@ public void setId(String id) { this.id = id; } + public void setCreators(List creators) { + this.creators = creators; + } + + public List getCreators() { + return creators; + } }