diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java index da6a3d6b485a..d2bcd7bf0b68 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java @@ -2004,12 +2004,22 @@ public static boolean validateMandatoryProperties(org.json.simple.JSONArray cust boolean isRequired = (boolean) property.get(APIConstants.CustomPropertyAttributes.REQUIRED); if (isRequired) { + APIInfoAdditionalPropertiesMapDTO mapPropertyDisplay = + additionalPropertiesMap.get(propertyName + "__display"); APIInfoAdditionalPropertiesMapDTO mapProperty = additionalPropertiesMap.get(propertyName); - if (mapProperty == null) { + if (mapProperty == null && mapPropertyDisplay == null) { return false; } - String propertyValue = mapProperty.getValue(); - if (propertyValue == null || propertyValue.isEmpty()) { + String propertyValue = ""; + String propertyValueDisplay = ""; + if (mapProperty != null) { + propertyValue = mapProperty.getValue(); + } + if (mapPropertyDisplay != null) { + propertyValueDisplay = mapPropertyDisplay.getValue(); + } + if ((propertyValue == null || propertyValue.isEmpty()) && + (propertyValueDisplay == null || propertyValueDisplay.isEmpty())) { return false; } }