-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
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
Default value for property of "integer enum" type caused POJO compilation error #706
Comments
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 19, 2017
… caused POJO compilation error
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 20, 2017
…pe caused POJO compilation error
Note, the error here relates to how the default value is passed to the enum fromValue method - it's currently always passed as a string e.g. (from the above schema) @JsonProperty("testEnum")
private IntegerEnumToSerialize.TestEnum testEnum
= IntegerEnumToSerialize.TestEnum.fromValue("3");
...
@JsonCreator
public static IntegerEnumToSerialize.TestEnum fromValue(Integer value) {
... |
I know, fixed already. |
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 21, 2017
…pe caused POJO compilation error
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 21, 2017
…pe caused POJO compilation error
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 22, 2017
…pe caused POJO compilation error
s13o
pushed a commit
to s13o/jsonschema2pojo
that referenced
this issue
Mar 22, 2017
…pe caused POJO compilation error
Closed by #706 from @thachhoang. Thanks for raising this and helping to improve the project @s13o! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
POJO like this generated wrong and can't be compiled
It can be reproduced easily with jsonschema2pojo/jsonschema2pojo-integration-tests/src/test/java/org/jsonschema2pojo/integration/EnumIT.java test
The text was updated successfully, but these errors were encountered: