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
It seems security definitions are not added to the headers and generated code has empty headers which giving runtime errors. Please see below swagger example.
Hey @chathudan
(Sorry for the late answer but I missed this issue)
That's intentional.
We decided to strip out all the securityDefinitions and handle the auth at the OkHttp/Interceptor level. This works really well when you have hundreds on authenticated endpoints and you don't want to pass the x-access-token every time.
I'll keep this as a feature request and would love to be know if someone else is interested in having this feature.
@cortinico Thank you for your message and awesome plugin, I already added Interceptor and did the job. Please consider a callback for Authenticator to handle 401 and interact user to re-authenticate.
Please consider a callback for Authenticator to handle 401 and interact user to re-authenticate.
I don't think this is in the scope of the Gradle plugin but should be configured on the OkHttpClient.
It's up to the client to take care of authentication (either with an Interceptor or with an Authenticator). The Gradle plugin is just generating Retrofit interfaces.
Thank you for the great plugin.
It seems security definitions are not added to the headers and generated code has empty headers which giving runtime errors. Please see below swagger example.
The text was updated successfully, but these errors were encountered: