-
-
Notifications
You must be signed in to change notification settings - Fork 490
Open
Labels
Bug 🐛This is something that is not working as expectedThis is something that is not working as expected
Description
Description
The current default for the RedocRenderPlugin in Litestar uses version='next' and constructs the JS bundle URL via a general CDN (for example: https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js). However, this URL appears to produce HTTP 404 errors or incorrect MIME types (e.g., text/plain) in some environments, thus rendering the ReDoc UI inoperative.
In contrast, the official ReDoc distribution via https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js has shown to work reliably.
Therefore, I propose:
- Update the default JS bundle URL construction for
RedocRenderPluginto use the stablecdn.redoc.lyhost (for example:https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.jsorlatest). - Consider deprecating the
version='next'default and recommending a specific version (orlatest) that is maintained.
Benefits:
- Avoids broken UI due to CDN or version tag issues.
- Improves reliability of API documentation UI out of the box.
Please let me know if I can help by submitting a PR for this change.
URL to code causing the issue
No response
MCVE
Steps to reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Screenshots
Logs
Litestar Version
2.18.0
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
Metadata
Metadata
Assignees
Labels
Bug 🐛This is something that is not working as expectedThis is something that is not working as expected