We are facing an issue where we are unable to use any variant of @ArraySchema to specify the limit of maxItems for the properties such as -
List<List< obj >> test;
List<List<List< obj >>>> listOfTest;
JSON Validation error:
Semantic error at test.items Arrays must have 'maxItems' property defined
Semantic error at listOfTest.items.items Arrays must have 'maxItems' property defined
Tried following -
@ArraySchema(schema = @ArraySchema(schema =@Schema(description = "test), maxItems =2))
@ArraySchema(arraySchema = @ArraySchema(schema =@Schema(description = "test), maxItems =2))
@ArraySchema(arraySchema = @Schema(//with type property)
But all the above flavors fail due to incompatibility error.
Incompatible Types : Found: ArraySchema, required: Schema
Project is using springdoc openapi version 1.6.5
Can someone please specify how to resolve this issue?
In Kotlin it can be done like this: