How i can document inner collection constraints in spring auto restdocs

106 views Asked by At

I'm trying to document inner constraint for Collections (NotBlank and Size) like:

@Valid    
private List<@NotBlank @Size(min = 1, max = 100) String> someAnotherUsefulInformationList;

Can I do it with built-in functionality?

PS: I found a place where constraints resolved here and after modifying this method I got access to needed constraints, but NotBlank fall into Optional field in the snippet

1

There are 1 answers

0
Grigorii Riabov On BEST ANSWER

Built-in functionality does not provide documenting inner collections constraints. After some research and finding this question i'm made a custom solution in this repository