Fix for issue 758
OpenAPI v2 Converter: NPE when 'enum' field is available and 'type' field is missing in query parameter
@@ -1007,7 +1007,7 @@ public class SwaggerConverter implements SwaggerParserExtension {
if (sp.getEnum() != null) {
for (String e : sp.getEnum()) {
- switch (sp.getType()) {
+ switch (sp.getType() == null ? SchemaTypeUtil.OBJECT_TYPE : sp.getType()) {
case SchemaTypeUtil.INTEGER_TYPE:
schema.addEnumItemObject(Integer.parseInt(e));
break;
