You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
I've been struggling last days trying to achieve the same result that I have in a ASP.NET core project but somehow I cannot find any way to configure Swagger and django-ninja in the same way.
Let me show the expected result when I setup Swagger in my .NET project:
Basically, when I add OAuthClientId to swagger, it is able to display a scope selector and trigger an authorization flow (in this case using Azure). The token is captured by Swagger and then it keeps the token to test any endpoint.
Once the goal is clear I would like to know if you think there is a way to achieve the same in django-ninja. I tried the following with no success:
As you can see, I am a bit lost trying to fine tune swagger options and I wonder if this is even possible. I though that maybe creating a new Authentication subclass might be what I need but before doing that I want to have a second opinion.
Any idea will be more than welcome :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I've been struggling last days trying to achieve the same result that I have in a ASP.NET core project but somehow I cannot find any way to configure Swagger and django-ninja in the same way.
Let me show the expected result when I setup Swagger in my .NET project:
Basically, when I add OAuthClientId to swagger, it is able to display a scope selector and trigger an authorization flow (in this case using Azure). The token is captured by Swagger and then it keeps the token to test any endpoint.
Once the goal is clear I would like to know if you think there is a way to achieve the same in django-ninja. I tried the following with no success:
docs=Swagger( settings={"oauth2RedirectUrl": "http://localhost:9081/oauth2/callback"} ),
As you can see, I am a bit lost trying to fine tune swagger options and I wonder if this is even possible. I though that maybe creating a new Authentication subclass might be what I need but before doing that I want to have a second opinion.
Any idea will be more than welcome :)
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions