Bundle redoc directly
nijel opened this issue · 1 comments
Describe the problem
Right now redoc
is bundled via drf-spectacular-sidecar. That way, we don't directly control redoc
version, it is missing from our client code licensing info and increases Weblate storage because it pulls also Swagger which we do not use.
Describe the solution you would like
Bundle redoc
in client
libraries similarly like we do with Sentry.
Describe alternatives you have considered
No response
Screenshots
No response
Additional context
Once this is done:
-
The
sidecar
extra can be removed:Line 52 in 8841711
-
drf_spectacular_sidecar
app should be removed fromINSTALLED_APPS
inweblate/settings_*.py
-
The URL will need to be adjusted in:
weblate/weblate/api/spectacular.py
Lines 12 to 14 in f60acb2
If possible, the build should also modify redoc
to not use external CDN for icon (see Redocly/redoc#2141). This request is blocked by CSP in Weblate, and we definitely don't want to allow it calling home.