Replace literal string with constant
@@ -62,6 +62,7 @@ import io.swagger.v3.parser.core.extensions.SwaggerParserExtension;
import io.swagger.v3.parser.core.models.AuthorizationValue;
import io.swagger.v3.parser.core.models.ParseOptions;
import io.swagger.v3.parser.core.models.SwaggerParseResult;
+import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.apache.commons.lang3.StringUtils;
@@ -991,13 +992,13 @@ public class SwaggerConverter implements SwaggerParserExtension {
if (sp.getEnum() != null) {
for (String e : sp.getEnum()) {
switch (sp.getType()) {
- case "integer":
+ case SchemaTypeUtil.INTEGER_TYPE:
schema.addEnumItemObject(Integer.parseInt(e));
break;
- case "number":
+ case SchemaTypeUtil.NUMBER_TYPE:
schema.addEnumItemObject(new BigDecimal(e));
break;
- case "boolean":
+ case SchemaTypeUtil.BOOLEAN_TYPE:
schema.addEnumItemObject(Boolean.valueOf(e));
break;
default:
