The restdocs type ParameterDescriptor contains an inherited map of attributes that may be used to define constraints.
But this attributes map is ignored when ParameterDescriptorWithType is created in ResourceSnippetParameters.kt:128.
Due to this problem constraints are ignored for path variables.
Edit @ozscheyge :
Same applies to HeaderDescriptorWithType