fix conversion when no definitions
@@ -149,12 +149,14 @@ public class SwaggerConverter implements SwaggerParserExtension {
}
}
+ if (swagger.getDefinitions() != null) {
for (String key : swagger.getDefinitions().keySet()) {
Model model = swagger.getDefinitions().get(key);
Schema schema = Json.mapper().convertValue(model, Schema.class);
components.addSchemas(key, schema);
}
+ }
openAPI.setComponents(components);
