It is possible to add a pattern to a header parameter? I am putting patterns to some fields in an JAVA application using swagger OpenAPI in the YAML file. In the body fields, i was able to put some patterns with no problem at all. I also tried to find any help or guide to add a pattern in a header parameter but I didn't found it. It is possible to do this with swagger OpenAPI?
MeuHeader:
name: meuHeader
in: header
description: Header.
schema:
type: string
pattern: '^[\d]{1,50}$'
The image above shows how I tried to add the pattern to the header parameter, but any string is been accepted in it. The strange fact is that in the swagger editor the pattern seems to work just fine, can someone know what the problem could be?