Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(critical) wrong dist for redoc #546

Closed
Leikaab opened this issue Oct 2, 2021 · 4 comments
Closed

(critical) wrong dist for redoc #546

Leikaab opened this issue Oct 2, 2021 · 4 comments
Labels
bug Something isn't working fix confirmation pending issue has been fixed and confirmation from issue reporter is pending

Comments

@Leikaab
Copy link

Leikaab commented Oct 2, 2021

in https://github.com/tfranzel/drf-spectacular/blob/master/drf_spectacular/views.py
there is a bug:

on line 203:
return spectacular_settings.SWAGGER_UI_DIST

should be
return spectacular_settings.REDOC_DIST

@Leikaab
Copy link
Author

Leikaab commented Oct 2, 2021

Quick temp work around:

from drf_spectacular.views import SpectacularRedocView
from drf_spectacular.settings import spectacular_settings


class SpectacularRedocViewFix(SpectacularRedocView):
    def _redoc_dist(self):
        return spectacular_settings.REDOC_DIST


urlpatterns += [
    #path('redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
    #replace with
    path('redoc/', SpectacularRedocViewFix.as_view(url_name='schema'), name='redoc'),
]

tfranzel added a commit that referenced this issue Oct 3, 2021
@tfranzel tfranzel added bug Something isn't working fix confirmation pending issue has been fixed and confirmation from issue reporter is pending labels Oct 3, 2021
@tfranzel
Copy link
Owner

tfranzel commented Oct 3, 2021

of course this detail was not tested before. 😞 will do a release asap.

@Leikaab
Copy link
Author

Leikaab commented Oct 3, 2021

Know the feel :)
Thank you for fixing it, and thank you for your work!!!

@tfranzel
Copy link
Owner

tfranzel commented Oct 3, 2021

0.20.1 is released

@tfranzel tfranzel closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix confirmation pending issue has been fixed and confirmation from issue reporter is pending
Projects
None yet
Development

No branches or pull requests

2 participants