swagger template processing fix

This commit is contained in:
Roman Vasilyev 2016-11-08 10:20:35 -08:00
parent ea60872e9e
commit a761a9406c

View File

@ -452,6 +452,9 @@ class SchemaGenerator(object):
"""
fields = []
if not hasattr(uritemplate, 'variables'):
return fields
for variable in uritemplate.variables(path):
field = coreapi.Field(name=variable, location='path', required=True)
fields.append(field)