📝 Test explicit `OpenAPIConfig.security` definition with `auth=None` per-endpoint (#1497)
Looks like we have a potential bug in how we define
security in OpenAPI.Here we always return
None:django-modern-rest/dmr/openapi/generators/security_scheme.py
Lines 24 to 37 in f822e35
But, if per-document
security is set, we need to return [] as the value. Otherwise, None won't be dumped by our None-ignoring dump_schema rules. And security rules per this endpoint will be inherited from the document.Which is wrong.
This would require a test and a fix. Maybe we should look at current config's
security to define the return type?#bug #good_first_issue #help_wanted #openapi #opensource_september #django_modern_rest
sent via relator