-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Hello,
I tried to generate pojo using the maxProperties field on an object of type object, but it seems not handled at all in jsonschema2pojo plugin.
As a workaround we could use maxItem instead.
The problem with this solution is the fact that maxItem should be applied on Array while maxProperties is dedicated to objects.
So the json we declare is wrong.
Do you plan to add the maxProperties behavior in the plugin?
In case you need my schema is:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "Some Id",
"type": "object",
"properties":
{
"product":
{
"description": "Some description",
"type": "string"
},
"attr":
{
"description": "Some attribute",
"type": "object",
"existingJavaType": "java.util.Map<String,String>",
"patternProperties":
{
"^.*$":
{
"type": "string"
}
},
"maxProperties":3,
}
},
"required": [ "product" ]
}
Metadata
Metadata
Assignees
Labels
No labels