-
-
Notifications
You must be signed in to change notification settings - Fork 228
Typing error in generated client when response attribute use reserved keywords #359
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
Labels
Comments
Thanks for reporting! We currently have utilities for stripping out keywords as well as some custom reserved words in openapi_python_client/utils.py . This doesn't check for builtins just yet, my guess is we need to do something like: import builtins
RESERVED_WORDS = set(dir(builtins)) |
dblanchette
added a commit
to coveord/openapi-python-client
that referenced
this issue
Mar 23, 2021
dblanchette
added a commit
to coveord/openapi-python-client
that referenced
this issue
Mar 23, 2021
dblanchette
added a commit
to coveord/openapi-python-client
that referenced
this issue
Mar 23, 2021
dblanchette
added a commit
to coveord/openapi-python-client
that referenced
this issue
Mar 23, 2021
dbanty
pushed a commit
that referenced
this issue
Mar 23, 2021
…ed clients (#360). Thanks @dblanchette! Fixes #359
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am using this library to generate a Python client for Jira using their OpenAPI spec.
I get a strange bug at import time:
After investigating for a while, I came to the conclusion that it's because the
JsonNode
object has an attribute named "int". The attribute shadows the built-in nameint
and causes type hinting to fail:To Reproduce
Steps to reproduce the behavior:
get_changelogs
:from the_jira_cloud_platform_rest_api_client.api.issues import get_change_logs
or anything else indirectly usingJsonNode
Expected behavior
A different name may need to be used here like
int_
or similar.OpenAPI Spec File
https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json
Desktop (please complete the following information):
Additional context
Thanks for the great tool!
The text was updated successfully, but these errors were encountered: