Bug Report Checklist
Description
I am generating Python client for my OpenAPI and it is outputting invalid Python code, where it has a Configuration class, which is trying to use self.access_token which is not initialised to any default value.
openapi-generator version
v.4.2.0
OpenAPI declaration file content or url
Generation Details
docker run --rm \
-v "${PWD}:/repo" openapitools/openapi-generator-cli generate \
-i /repo/spec.yaml \
-g python --package-name "my_api" \
-o /repo/openapi/my_api
Related Issues
#7929
Steps to reproduce
With generated client, just go to configuration.py you will see that self.access_token is being used, though it was not initialised anywhere.
Suggest a fix
Initialise access_token value to None by default
Bug Report Checklist
Description
I am generating Python client for my OpenAPI and it is outputting invalid Python code, where it has a Configuration class, which is trying to use
self.access_tokenwhich is not initialised to any default value.openapi-generator version
v.4.2.0
OpenAPI declaration file content or url
Generation Details
Related Issues
#7929
Steps to reproduce
With generated client, just go to
configuration.pyyou will see thatself.access_tokenis being used, though it was not initialised anywhere.Suggest a fix
Initialise access_token value to None by default