我试图创造springDoc昂首阔步的文件,我想表示一个这样的数据
List<String> elements;
具有某些特性如minSize和MaxSize/minLength最长为值在名单。
我试着用这个
@Schema(required = true, minLength = 12,maxLength = 20)
List<String> elements;
和
@Size(min=10,max=20)
List<String> elements;
结果是:
"Products": {
"title": "Products",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
任何想法有这样的结果:
"Products": {
"title": "Products",
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "string",
"maxLength": 20,
"minLength": 5
}
}
}
}