We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integer type should generate integer output instead of string.
2.2.2
definitions: BaseModel: discriminator: baseModelType properties: code: type: integer format: int32 default: 0 enum: [0, 1] description: 0 normal, 1 error. required: - code - baseModelType
-l spring --library spring-mvc
public class BaseModel { /** * 0 normal, 1 error. */ public enum CodeEnum { NUMBER_0(0), NUMBER_1(1); private Integer value; CodeEnum(Integer value) { this.value = value; } @Override @JsonValue public String toString() { return String.valueOf(value); }
which output string json value instead of integer:
{ "code": "0" }
The text was updated successfully, but these errors were encountered:
Not related to your issue, but I think you need to also define the baseModelType as a property.
baseModelType
Sorry, something went wrong.
No branches or pull requests
Description
integer type should generate integer output instead of string.
Swagger-codegen version
2.2.2
Swagger declaration file content or url
Command line used for generation
-l spring --library spring-mvc
Generated Java Model
which output string json value instead of integer:
The text was updated successfully, but these errors were encountered: