use of io.swagger.report.Severity in project swagger-parser by swagger-api.
the class SwaggerJsonValidator method fillMessages.
private static boolean fillMessages(final ProcessingReport report, final MessageBuilder builder) {
final Severity severity = LEVEL_MAP.get(report.getLogLevel());
final ArrayNode node = JacksonUtils.nodeFactory().arrayNode();
for (final ProcessingMessage processingMessage : report) {
node.add(processingMessage.asJson());
}
final String reportAsString = JacksonUtils.prettyPrint(node);
final Message message = new Message("", reportAsString, severity);
builder.append(message);
return report.isSuccess();
}
Aggregations