1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-10-18 00:50:07 +00:00

feat(api): migrate API documentation from drf-yasg to drf-spectacular

- Replace abandoned drf-yasg with drf-spectacular and drf-spectacular-sidecar
- Configure OpenAPI 3.0 schema generation and offline sidecar assets in settings
- Update schema, Swagger UI, and ReDoc routes in webvirtcloud/urls.py
- Add backwards-compatible AutoSchema fallback for existing settings installations
- Remove 130 obsolete legacy drf-yasg static assets
- Update upgrade instructions in README.md and project documentation
This commit is contained in:
catborise 2026-09-25 08:08:36 +03:00
parent 6d8a62a95e
commit 67364e2a05
136 changed files with 44 additions and 15995 deletions

View file

@ -363,6 +363,11 @@ python3 manage.py collectstatic --noinput
sudo service supervisor restart
```
> **Note on Settings Upgrade:**
> When upgrading from earlier versions using `drf-yasg`, update your `webvirtcloud/settings.py`:
> 1. In `INSTALLED_APPS`, replace `'drf_yasg'` with `'drf_spectacular'` and `'drf_spectacular_sidecar'`.
> 2. Ensure the `REST_FRAMEWORK` and `SPECTACULAR_SETTINGS` configuration blocks are present (see `webvirtcloud/settings.py.template`).
### Running tests
Server on which tests will be performed must have libvirt up and running.