mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
swagger template processing fix
This commit is contained in:
parent
ea60872e9e
commit
a761a9406c
|
@ -452,6 +452,9 @@ class SchemaGenerator(object):
|
||||||
"""
|
"""
|
||||||
fields = []
|
fields = []
|
||||||
|
|
||||||
|
if not hasattr(uritemplate, 'variables'):
|
||||||
|
return fields
|
||||||
|
|
||||||
for variable in uritemplate.variables(path):
|
for variable in uritemplate.variables(path):
|
||||||
field = coreapi.Field(name=variable, location='path', required=True)
|
field = coreapi.Field(name=variable, location='path', required=True)
|
||||||
fields.append(field)
|
fields.append(field)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user