Fix for issue convert integer elements of enum into the correct type
@@ -986,9 +986,13 @@ public class SwaggerConverter implements SwaggerParserExtension {
if (sp.getEnum() != null) {
for (String e : sp.getEnum()) {
+ if ("integer".equals(sp.getType())) {
+ schema.addEnumItemObject(Integer.parseInt(e));
+ } else {
schema.addEnumItemObject(e);
}
}
+ }
if (sp.getVendorExtensions() != null) {
Object nullableExtension = sp.getVendorExtensions().get("x-nullable");
