mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
fix enum type comparison for string
This commit is contained in:
parent
850c958d83
commit
bea6af7f37
@ -5306,7 +5306,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (var.defaultValue != null) {
|
||||
String enumName = null;
|
||||
final String enumDefaultValue;
|
||||
if ("string".equalsIgnoreCase(dataType)) {
|
||||
if (typeMapping.get("string").equalsIgnoreCase(dataType)) {
|
||||
enumDefaultValue = toEnumValue(var.defaultValue, dataType);
|
||||
} else {
|
||||
enumDefaultValue = var.defaultValue;
|
||||
|
@ -158,6 +158,8 @@ public class NimClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
typeMapping.put("DateTime", "string");
|
||||
typeMapping.put("password", "string");
|
||||
typeMapping.put("file", "string");
|
||||
typeMapping.put("string", "string");
|
||||
|
||||
}
|
||||
|
||||
public void setPackageName(String packageName) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user