WeblateOrg/weblate

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:

    "drf-spectacular[sidecar]>=0.27.2,<0.28",

  • drf_spectacular_sidecar app should be removed from INSTALLED_APPS in weblate/settings_*.py

  • The URL will need to be adjusted in:

    # Use redoc from sidecar
    # TODO: Should bundle it internally
    "REDOC_DIST": "SIDECAR",

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.