diff --git a/Backend/services/core/src/main/java/org/edu_sharing/restservices/PersonDao.java b/Backend/services/core/src/main/java/org/edu_sharing/restservices/PersonDao.java index a02a69ea8..c1be04a4d 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/restservices/PersonDao.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/restservices/PersonDao.java @@ -217,7 +217,7 @@ private static HashMap profileToMap(UserProfileEdit profil newUserInfo.put(CCConstants.PROP_USER_LASTNAME, profile.getLastName()); newUserInfo.put(CCConstants.PROP_USER_EMAIL, profile.getEmail()); newUserInfo.put(CCConstants.CM_PROP_PERSON_ABOUT, profile.getAbout()); - newUserInfo.put(CCConstants.CM_PROP_PERSON_SKILLS, profile.getSkills()); + newUserInfo.put(CCConstants.CM_PROP_PERSON_SKILLS, new ArrayList(Arrays.asList(profile.getSkills()))); newUserInfo.put(CCConstants.CM_PROP_PERSON_VCARD, profile.getVCard()); if(AuthorityServiceFactory.getLocalService().isGlobalAdmin()) { newUserInfo.put(CCConstants.CM_PROP_PERSON_EDU_SCHOOL_PRIMARY_AFFILIATION, profile.getPrimaryAffiliation()); @@ -573,7 +573,11 @@ public String getPrimaryAffiliation() { } public String[] getSkills() { - return (String[])this.userInfo.get(CCConstants.CM_PROP_PERSON_SKILLS); + List skills = (List)this.userInfo.get(CCConstants.CM_PROP_PERSON_SKILLS); + if(skills != null){ + return skills.toArray(new String[0]); + } + return null; } public String getHomeFolder() { if(this.homeFolderId == null) { diff --git a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/UserProfile.java b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/UserProfile.java index 9b2402bb2..1fabbae66 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/UserProfile.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/UserProfile.java @@ -94,7 +94,9 @@ public String getAbout() { public void setAbout(String about) { this.about = about; } - @JsonProperty + + @JsonProperty + @Schema(description = "",nullable = true) public String[] getSkills() { return skills; } diff --git a/Backend/services/rest/api/src/main/resources/openapi.json b/Backend/services/rest/api/src/main/resources/openapi.json index 997d5d68f..77a443c86 100644 --- a/Backend/services/rest/api/src/main/resources/openapi.json +++ b/Backend/services/rest/api/src/main/resources/openapi.json @@ -6067,8 +6067,10 @@ }, "skills": { "items": { + "nullable": true, "type": "string" }, + "nullable": true, "type": "array" }, "type": { @@ -6121,8 +6123,10 @@ }, "skills": { "items": { + "nullable": true, "type": "string" }, + "nullable": true, "type": "array" }, "type": { @@ -6170,8 +6174,10 @@ }, "skills": { "items": { + "nullable": true, "type": "string" }, + "nullable": true, "type": "array" }, "type": {