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
Hello! I have some json scheme with object
{ "myEnum": { "type": "object", "properties": { "code": { "type": "integer" }, "name": { "type": "string" } }, "enum": [ { "code": 1, "name": "Example 1" } ], "javaEnumNames": [ "EXAMPLE_1" ] } }
I want to generate similar structure
public class MainClass { private MyEnum myEnum; } public enum MyEnum { sub1(new Subitem(1, "asd")), sub2(new Subitem(2, "asd1")); private Subitem subitem; MyEnum(Subitem asd1) { this.subitem = asd1; } public Subitem getSubitem() { return subitem; } public void setSubitem(Subitem subitem) { this.subitem = subitem; } } public static class Subitem { private Integer code; private String name; public Subitem(Integer code, String name) { this.code = code; this.name = name; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
How can i do this? That now, after generation a have a class without object ("code": 1, "name": "Example 1")
public enum MyEnum { sub1(null), sub2(null); }
The text was updated successfully, but these errors were encountered:
Not supported I'm afraid, but discussed in #1181
Sorry, something went wrong.
No branches or pull requests
Hello!
I have some json scheme with object
I want to generate similar structure
How can i do this? That now, after generation a have a class without object ("code": 1, "name": "Example 1")
The text was updated successfully, but these errors were encountered: