okfde / froide

Freedom Of Information Portal
MIT License
364 stars 86 forks source link

✨ Improve API docs by using DRF-Spectacular #648

Closed pajowu closed 1 year ago

stefanw commented 1 year ago

Due to our CSP settings this is currently not working in production because SwaggerUI and Redoc fail to load JS from CDNs. There are settings to change the script URLs. The question is just how we get those onto our setup. Maybe just separate vite entrypoints?

pajowu commented 1 year ago

DRF-Spectacular provides the sidecar package to serve these files locally. I will create a new PR to add those: https://github.com/tfranzel/drf-spectacular#self-contained-ui-installation