You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For java code generation from swagger, for enums, there is a bug in code generation.
I have tried many versions so far but no luck. To replicate the issue, please take the latest stable version or this:
<swagger.codegen.version>3.0.45</swagger.codegen.version>
I have already added under properties: <errorOnUnknownEnum>true</errorOnUnknownEnum>
The code generated has:
"Unexpected value '" + text + "' for 'MyTest' enum."
instead of:
"Unexpected value '" + input+ "' for 'MyTest' enum."
@JsonCreator
public static TypeEnum fromValue(String input) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(input)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + text + "' for 'MyTest' enum.");
}
For java code generation from swagger, for enums, there is a bug in code generation.
I have tried many versions so far but no luck. To replicate the issue, please take the latest stable version or this:
<swagger.codegen.version>3.0.45</swagger.codegen.version>
I have already added under properties:
<errorOnUnknownEnum>true</errorOnUnknownEnum>
The code generated has:
"Unexpected value '" + text + "' for 'MyTest' enum."
instead of:
"Unexpected value '" + input+ "' for 'MyTest' enum."
Also there is mention of this change here:
#713
May be the same is missing in the latest version 3.x.x
The text was updated successfully, but these errors were encountered: