urljoin with leading slash remove part of path

This commit is contained in:
Julien Surloppe 2016-07-28 21:54:45 +02:00
parent 48a2f084aa
commit f183a48de0

View File

@ -206,6 +206,9 @@ class SchemaGenerator(object):
else:
encoding = None
if self.url and path.startswith('/'):
path = path[1:]
return coreapi.Link(
url=urlparse.urljoin(self.url, path),
action=method.lower(),