springDoc swagger belgeleri oluşturmaya çalışıyorum ve bunun gibi bir veriyi temsil etmek istiyorum
List<String> elements;
listedeki değerler için minSize ve MaxSize / minLength Max length gibi bazı özelliklere sahip olmak.
Bunu denedim
@Schema(required = true, minLength = 12,maxLength = 20)
List<String> elements;
ve
@Size(min=10,max=20)
List<String> elements;
sonuç:
"Products": {
"title": "Products",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Herhangi bir fikir bu neden var :
"Products": {
"title": "Products",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "string",
"maxLength": 20,
"minLength": 5
}
}
}
}