Open CoreJa opened 3 years ago
https://github.com/axnsan12/drf-yasg/blob/b99306f71c6a5779b62189df7d9c1f5ea1c794ef/src/drf_yasg/generators.py#L189-L197
as your code here, url from swagger_settings.DEFAULT_API_URL is read by generator but never used.
swagger_settings.DEFAULT_API_URL
I appended two lines after if parsed_url.path: like this:
if parsed_url.path:
if parsed_url.path: ... else: self._gen.url = url
Then it works. I'm making a pr if that's fine with you.
I've made a pr here.
https://github.com/axnsan12/drf-yasg/blob/b99306f71c6a5779b62189df7d9c1f5ea1c794ef/src/drf_yasg/generators.py#L189-L197
as your code here, url from
swagger_settings.DEFAULT_API_URL
is read by generator but never used.I appended two lines after
if parsed_url.path:
like this:Then it works. I'm making a pr if that's fine with you.