diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index b039c749b..6eab4213a 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -389,8 +389,6 @@ class AutoSchema(ViewInspector): schema['format'] = 'email' if isinstance(v, URLValidator): schema['format'] = 'uri' - if isinstance(v, URLValidator): - schema['format'] = 'uri' if isinstance(v, RegexValidator): schema['pattern'] = v.regex.pattern elif isinstance(v, MaxLengthValidator):