Skip to content

Commit 135b277

Browse files
author
Chris Wiechmann
committed
Don't export Custom-Properties if not declared for an API
1 parent 8cba077 commit 135b277

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

modules/apis/src/main/java/com/axway/apim/api/export/ExportAPI.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ public String getDeprecated() {
209209

210210
public Map<String, String> getCustomProperties() {
211211
if(this.actualAPIProxy.getCustomProperties()!=null && this.actualAPIProxy.getCustomProperties().size()==0) return null;
212+
Iterator<String> it = this.actualAPIProxy.getCustomProperties().values().iterator();
213+
boolean propertyFound = false;
214+
while(it.hasNext()) {
215+
String propValue = it.next();
216+
if(propValue!=null) {
217+
propertyFound = true;
218+
break;
219+
}
220+
}
221+
if(!propertyFound) return null; // If no property is declared for this API return null
212222
return this.actualAPIProxy.getCustomProperties();
213223
}
214224

0 commit comments

Comments
 (0)