을 만들려고 springDoc swagger 문서,그리고 나를 나타내는 데이터는 다음과 같이
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
}
}
}
}