bravado
bravado copied to clipboard
Should not rewrite custom auth headers from _request_options
Hi, I'm using bravado for end-to-end checks. One use case is :
- Use
default_apikey
for every request - Create
new_apikey
using API - Check that requests with
new_apikey
applied work.
Currently to make this work one should wrap SwaggerClient/RequestsClient or create separate SwaggerClients for each api key. Reason is that ApiKeyAuthenticator.apply
overwrites any custom auth headers from _request_options
.
It would be better if ApiKeyAuthenticator.apply
could skip setting request.headers[self.param_name]
if this header already exists.
I suppose similar thing is applicable to other Authenticator variations.