Hi there!
I'm just coming to drf_spectacular after using drf_yasg for many years, and I'm having to change all my openapi.Parameter definitions over to OpenApiParameter. What's really puzzling me is that I can set type=OpenApiTypes.REGEX, but I cannot set a pattern when initialising the parameter. I understand that serializers can use Regex validators, but I can't see how to add a regex pattern to a parameter.
I'm prepared to write the code to support it, but I thought I'd check first the correct way of setting a regex pattern on a parameter.
Thanks in advance,
Paul
Hi there!
I'm just coming to
drf_spectacularafter usingdrf_yasgfor many years, and I'm having to change all myopenapi.Parameterdefinitions over toOpenApiParameter. What's really puzzling me is that I can settype=OpenApiTypes.REGEX, but I cannot set a pattern when initialising the parameter. I understand that serializers can use Regex validators, but I can't see how to add a regex pattern to a parameter.I'm prepared to write the code to support it, but I thought I'd check first the correct way of setting a regex pattern on a parameter.
Thanks in advance,
Paul