diff options
Diffstat (limited to 'ms/controllerblueprints')
2 files changed, 6 insertions, 9 deletions
diff --git a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/filters/ApplicationLoggingFilter.java b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/filters/ApplicationLoggingFilter.java index 60837e8a7..331a44d83 100644 --- a/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/filters/ApplicationLoggingFilter.java +++ b/ms/controllerblueprints/application/src/main/java/org/onap/ccsdk/cds/controllerblueprints/filters/ApplicationLoggingFilter.java @@ -79,7 +79,7 @@ public class ApplicationLoggingFilter implements WebFilter { header.add(BluePrintConstants.RESPONSE_HEADER_PATCH_VERSION, tokens[2]); header.add(BluePrintConstants.RESPONSE_HEADER_LATEST_VERSION, appVersion); } catch (Exception e) { - e.printStackTrace(); + log.error("*** Error ***", e); } return webFilterChain.filter(serverWebExchange); diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java index abf774981..38216a616 100644 --- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java +++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/cds/controllerblueprints/service/common/SwaggerGenerator.java @@ -155,19 +155,16 @@ public class SwaggerGenerator { defProperty = new StringProperty(); } } else if (BluePrintTypes.validCollectionTypes().contains(propertyDefinition.getType())) { - ArrayProperty arrayProperty = new ArrayProperty(); + Optional<Property> innerType = Optional.empty(); if (propertyDefinition.getEntrySchema() != null) { String entrySchema = propertyDefinition.getEntrySchema().getType(); if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema)) { - Property innerType = new RefProperty("#/definitions/" + entrySchema); - arrayProperty.setItems(innerType); - } else { - Property innerType = new StringProperty(); - arrayProperty.setItems(innerType); + innerType = Optional.of(new RefProperty("#/definitions/" + entrySchema)); } - defProperty = arrayProperty; } - + ArrayProperty arrayProperty = new ArrayProperty(); + arrayProperty.setItems(innerType.orElseGet(StringProperty::new)); + defProperty = arrayProperty; } else { defProperty = new RefProperty("#/definitions/" + propertyDefinition.getType()); } |