Change get_links method code

This commit is contained in:
sol HYUN 2017-03-23 17:48:01 +09:00
parent f6d04e651a
commit f60114c0a7

View File

@ -322,13 +322,12 @@ class SchemaGenerator(object):
# Only generate the path prefix for paths that will be included
if not paths:
return None
prefix = self.determine_path_prefix(paths)
for path, method, view in view_endpoints:
if not self.has_view_permissions(path, method, view):
continue
link = self.get_link(path, method, view)
subpath = path[len(prefix):]
typical_path = self.make_typical_path(path)
keys = self.get_keys(subpath, method, view)
insert_into(links, keys, link)
return links