Ah thanks, I see I had already <3'd that PR :)

I'll keep manually adding until the next release. Thanks!

On Sat, Jan 23, 2021 at 10:19 AM Alan Crosswell <a...@columbia.edu> wrote:

> See https://github.com/encode/django-rest-framework/pull/7516 which is
> hopefully in the pipeline for the 3.13 release. This adds a framework for
> adding bearerAuth, etc. by adding two class methods to each Authentication
> class. I believe what you are calling bearerAuth I called tokenAuth.
>
> On Sat, Jan 23, 2021 at 12:54 PM Adam Fletcher <a...@bit.io> wrote:
>
>> Hi DRFers,
>>
>> I'm using the default OpenAPI schema generator on the latest DRF, and it
>> is not adding the component section for securitySchemes nor is it adding
>> the general security block.
>>
>> Specifically, if i get the the schema with format openapi-json, I don't
>> see:
>>
>> {
>>   ...
>>   "components": {
>>     ...
>>     "securitySchemes": {
>>       "bearerAuth": {
>>         "type": "http",
>>         "scheme": "bearer"
>>      }
>>     }
>>   },
>>   "security": [
>>     {
>>       "bearerAuth": []
>>     }
>>   ]
>> }
>>
>> I'm using the default schema generator, my settings for authentication
>> classes:
>>
>>     "DEFAULT_AUTHENTICATION_CLASSES": [
>>         "rest_framework.authentication.SessionAuthentication",
>>     ],
>>
>> Any ideas why the securitySchemas aren't showing up in my OpenAPI schema?
>>
>> Thanks!
>>
>> -Adam
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django REST framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-rest-framework+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-rest-framework/CAEP43uNG1J7rK7p%2BCZ%2BFrSHBb6Y7zHxcDo%2BhzSJ36Oy9K0Bo4A%40mail.gmail.com
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_django-2Drest-2Dframework_CAEP43uNG1J7rK7p-252BCZ-252BFrSHBb6Y7zHxcDo-252BhzSJ36Oy9K0Bo4A-2540mail.gmail.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=a3ezL4lCe2bTHvj4JC9uhE1aTSWcxSRMtLGs7GpBJEA&m=VHUJ_bEzboZBzpIJDtm8gxbeYPO6PQthWZEz6ly-VTY&s=es5mrjntIkJungCaiJZu0R7DVWrlOM1G4AsAYhqvhj4&e=>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-rest-framework+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-rest-framework/CAJaAdZjKHex2Ae%3Ds%3DOfXdYncPGb1vvXtRBbb%3D9JLFdtAOuj2jA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-rest-framework/CAJaAdZjKHex2Ae%3Ds%3DOfXdYncPGb1vvXtRBbb%3D9JLFdtAOuj2jA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/CAEP43uM371Qozx33JAYrmuyQGTYHdh_H12b%3DNj3uNMQRhYFPSQ%40mail.gmail.com.

Reply via email to