mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +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:
|
else:
|
||||||
encoding = None
|
encoding = None
|
||||||
|
|
||||||
|
if self.url and path.startswith('/'):
|
||||||
|
path = path[1:]
|
||||||
|
|
||||||
return coreapi.Link(
|
return coreapi.Link(
|
||||||
url=urlparse.urljoin(self.url, path),
|
url=urlparse.urljoin(self.url, path),
|
||||||
action=method.lower(),
|
action=method.lower(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user