mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
urljoin with leading slash remove part of path (#4332)
This commit is contained in:
parent
5b071ab35e
commit
e997713313
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user