We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
openapi-generator-cli 6.2.1 commit : b0ce532 built : 2022-11-01T09:40:00Z source : https://github.com/openapitools/openapi-generator docs : https://openapi-generator.tech/
https://admin.splunk.com/service/info/specs/v2/openapi.json
openapi-generator generate -g python -o out -i https://admin.splunk.com/service/info/specs/v2/openapi.json --package-name splunkacs --skip-validate-spec
It generates test code that looks like this:
configuration = splunkacs.Configuration( access_token = 'xxx')
Later when you run the code, the attribute access_token is not a keyword argument of Configuration and error is thrown.
configuration = splunkacs.Configuration( TypeError: Configuration.__init__() got an unexpected keyword argument 'access_token'
This is strange as Configuration class does have `set_attr' defined.
I'm assuming that Configuration class is supposed to use set__attr to catch undefined keyword argument, why didn't it work?
The text was updated successfully, but these errors were encountered:
FYI this was fixed earlier in the future home pf the python generator: openapi-json-schema-tools/openapi-json-schema-generator@84557a9 and is available in the v1.0.3 release there
and a verification test was included here
Sorry, something went wrong.
@bayeslearner fixed
Successfully merging a pull request may close this issue.
Bug Report Checklist
Description
openapi-generator version
openapi-generator-cli 6.2.1
commit : b0ce532
built : 2022-11-01T09:40:00Z
source : https://github.com/openapitools/openapi-generator
docs : https://openapi-generator.tech/
OpenAPI declaration file content or url
https://admin.splunk.com/service/info/specs/v2/openapi.json
Generation Details
openapi-generator generate -g python -o out -i https://admin.splunk.com/service/info/specs/v2/openapi.json --package-name splunkacs --skip-validate-spec
Steps to reproduce
It generates test code that looks like this:
Later when you run the code, the attribute access_token is not a keyword argument of Configuration and error is thrown.
This is strange as Configuration class does have `set_attr' defined.
Suggest a fix
I'm assuming that Configuration class is supposed to use set__attr to catch undefined keyword argument, why didn't it work?
The text was updated successfully, but these errors were encountered: