-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How to create a simple pojo class with map attribute, not able to find any example. #1582
Comments
Hi. When posting code snippets like this, please use backtick blocks like this: It makes things a lot easier to read. I have added them on your example. Could you try adding this inside the vendorAttributes schema: "existingJavaType":"java.util.Map<String, CustomClass>", You will probably have to pull CustomClass out into its own file so that this gets generated too. |
I wanted just a map of List values like below: I just wanted a field to be
But I see that the generated code fails compilation because it doesn't recognize |
Hi Please use fully qualified names when referring to types that are outside same or "varieties": {
"type": "object",
"existingJavaType": "java.util.Map<String, java.util.List<String>>",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
} |
I want to create a simple pojo class like:
the Json i am using:
but getting 3 classes as output:
What property to set or this is the expected behavior?
The text was updated successfully, but these errors were encountered: