Description
When creating multiple Configurations using Configuration(), the dictionary in the field api_key is shared across these multiple (different) configurations.
openapi-generator version
3.3.3
OpenAPI declaration file content or url
Doesn't matter which declaration
Steps to reproduce
In any generated API:
c1 = Configuration()
c1.api_key['x-auth-token']="mytoken"
c2 = Configuration()
assert(c2.api_key['x-auth-token']=="mytoken")
The assertion should fail but it actually does not.
Suggest a fix
It's probably a problem with the default value supplied to the constructor of Configuration. If you supply a {} default value the same dict will be shared between different invocations of the constructor. The standard way to solve this is by putting a default None value and if the value is indeed None then create a new {} inside the constructor.
Description
When creating multiple Configurations using
Configuration(), the dictionary in the fieldapi_keyis shared across these multiple (different) configurations.openapi-generator version
3.3.3
OpenAPI declaration file content or url
Doesn't matter which declaration
Steps to reproduce
In any generated API:
The assertion should fail but it actually does not.
Suggest a fix
It's probably a problem with the default value supplied to the constructor of
Configuration. If you supply a{}default value the same dict will be shared between different invocations of the constructor. The standard way to solve this is by putting a defaultNonevalue and if the value is indeedNonethen create a new{}inside the constructor.