Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void processRules(Map<String, String> inputRules) {

// loop through all the rules
for (Map.Entry<String, String> rule : inputRules.entrySet()) {
LOGGER.info("processing rule {} => {}", rule.getKey(), rule.getValue());
LOGGER.debug("processing rule {} => {}", rule.getKey(), rule.getValue());
if (!ruleNames.contains(rule.getKey())) { // invalid rule name
LOGGER.warn("Invalid openapi-normalizer rule name: ", rule.getKey());
} else if (enableAll) {
Expand Down Expand Up @@ -882,6 +882,11 @@ private Schema processNormalize31Spec(Schema schema, Set<Schema> visitedSchemas)
if (!getRule(NORMALIZE_31SPEC)) {
return schema;
}

if (schema == null || schema.getTypes() == null) {
return null;
}

// process null
if (schema.getTypes().contains("null")) {
schema.setNullable(true);
Expand Down