Grigorii Riabov
Grigorii Riabov

Reputation: 215

How i can document inner collection constraints in spring auto restdocs

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

Upvotes: 0

Views: 140

Answers (1)

Grigorii Riabov
Grigorii Riabov

Reputation: 215

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

Upvotes: 0

Related Questions