Skip to content

Commit

Permalink
fix #268 - fixes server url and add options
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Aug 27, 2019
1 parent df56646 commit a5d5a6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/io/swagger/oas/inflector/OpenAPIInflector.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ protected void init(Configuration configuration) {
}

Map<String, PathItem> paths = openAPI.getPaths();
Map<String, Schema> definitions = openAPI.getComponents().getSchemas();
Map<String, Schema> definitions = null;
if (openAPI.getComponents() == null || openAPI.getComponents().getSchemas() == null) {
definitions = new HashMap<>();
} else {
definitions = openAPI.getComponents().getSchemas();
}
for (String pathString : paths.keySet()) {
PathItem pathItem = paths.get(pathString);
final Resource.Builder builder = Resource.builder();
Expand Down

0 comments on commit a5d5a6c

Please sign in to comment.