You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A possible fix could be to explicitly check for this case. Below is a proposed fix, but I'm not familiar enough with the codebase to know whether this is a correct fix. However, I was able to parse the API docs correctly with this fix in place:
if type(default) is list:
return [f"prop.class_info.name.inverse_values[d]" for d in default]
else:
return f"{prop.class_info.name}.{inverse_values[default]}"
To Reproduce
Steps to reproduce the behavior:
Run openapi-python-client generate --url https://sand-docs.ilevelsolutions.eu/openapi.yaml
See error
Expected behavior
The API docs should be able to be parsed
Describe the bug
When generating models for an API where a default argument is a list of enums, a TypeError is raised on this line:
A possible fix could be to explicitly check for this case. Below is a proposed fix, but I'm not familiar enough with the codebase to know whether this is a correct fix. However, I was able to parse the API docs correctly with this fix in place:
To Reproduce
Steps to reproduce the behavior:
openapi-python-client generate --url https://sand-docs.ilevelsolutions.eu/openapi.yaml
Expected behavior
The API docs should be able to be parsed
OpenAPI Spec File
https://sand-docs.ilevelsolutions.eu/openapi.yaml
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: