Находки в опенсорсе: Python
983 subscribers
4 photos
221 links
Легкие задачки в опенсорсе из мира Python

Чат: @opensource_findings_chat
Download Telegram
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Formalize our CDN / static files support for OpenAPI renderers (#678)


I think that we should be able to configure: do we want to use local static files, served by django for OpenAPI renderers and interactive APIs, or should we use CDN for this.

Currently:

• Swagger uses local static files
• Scalar / Redoc use CDNs

Plan:

1. Introduce openapi_static_cdn: {'scalar': 'https://cdn_url.com'} option, where we can specify when these libs should use CDN
2. Only when some lib has this explicit setting, we should use the CDN. Otherwise, they should use local static files which should be copied to dmr
3. We need to document the EXACT versions we have bundleded in our static files
4. We need to copy their licenses as well, not just static files. Because we take their code / build result. They can go to our LICENSE.md at the very bottom, specify why it is there

#enhancement #good_first_issue #help_wanted #openapi #django_modern_rest
sent via relator