Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] API Key sharing between Configuration instances (port the 2.x fix) #807

Open
mpkouznetsov opened this issue Nov 17, 2020 · 0 comments

Comments

@mpkouznetsov
Copy link

mpkouznetsov commented Nov 17, 2020

Description
Swagger-codegen version

3.0.22

In 3.0.x the instances of the Configuration Python class generated still share the api_key. This has been fixed in 2.4: swagger-api/swagger-codegen#9117

Steps to reproduce

I confirmed that, after creating 2 instances of Configuration changing the content of the api_key dict on one instance changes its content in the other:

>>> from my_client import Configuration
>>> c1 = Configuration()
>>> c1.api_key['Authorization'] = "c1 auth"
>>> c2 = Configuration()
>>> c2.api_key['Authorization'] = "c2 auth"
>>> for c in [c1, c2]:
...     print(c.api_key)
...
{'Authorization': 'c2 auth'}
{'Authorization': 'c2 auth'}
Related issues/PRs

swagger-api/swagger-codegen#9117

Suggest a fix/enhancement

The fix for swagger-api/swagger-codegen#9117 (swagger-api/swagger-codegen#9130) could conceivably be ported to 3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant