diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index 875f9454b..e57227651 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -524,6 +524,9 @@ class SchemaGenerator(object): model = getattr(getattr(view, 'queryset', None), 'model', None) fields = [] + if not hasattr(uritemplate, 'variables'): + return fields + for variable in uritemplate.variables(path): title = '' description = ''