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
Describe the bug
A trailing comma in the type signature of the endpoint_macros template causes Union types to include a trailing comma after the last type in the union.
To Reproduce
We run the following script to generate our client:
#!/usr/bin/env bashset -x # added for clarity below
rm -rf test-api-client
openapi-python-client generate --path test.yaml
autoflake --in-place --remove-all-unused-imports --remove-unused-variables --expand-star-imports -r test-api-client/
isort test-api-client/
black test-api-client/
# Ignore lines too long and bare except
flake8 --ignore=E722,E501 test-api-client/
With 0.6.0-alpha release it produces the following output:
+ rm -rf test-api-client
+ openapi-python-client generate --path test.yaml
Generating test-api-client
+ autoflake --in-place --remove-all-unused-imports --remove-unused-variables --expand-star-imports -r test-api-client/
+ isort test-api-client/
+ black test-api-client/
reformatted /Users/daniel/openapi-specs1/test-api-client/test_api_client/models/__init__.py
All done! ✨ 🍰 ✨
1 file reformatted, 8 files left unchanged.
+ flake8 --ignore=E722,E501 test-api-client/
test-api-client/test_api_client/api/default/create_cat.py:33:36: E231 missing whitespace after ','
test-api-client/test_api_client/api/default/create_cat.py:43:36: E231 missing whitespace after ','
test-api-client/test_api_client/api/default/create_cat.py:56:36: E231 missing whitespace after ','
test-api-client/test_api_client/api/default/create_cat.py:73:36: E231 missing whitespace after ','
test-api-client/test_api_client/api/default/create_cat.py:86:36: E231 missing whitespace after ','
test-api-client/test_api_client/api/default/create_cat.py:102:36: E231 missing whitespace after ','
Expected behavior
Since flake8 is part of our pipeline, we'd love for it to pass on the generated client.
Describe the bug
A trailing comma in the type signature of the endpoint_macros template causes Union types to include a trailing comma after the last type in the union.
To Reproduce
We run the following script to generate our client:
With 0.6.0-alpha release it produces the following output:
Expected behavior
Since flake8 is part of our pipeline, we'd love for it to pass on the generated client.
OpenAPI Spec File
https://gist.github.com/dtkav/3f4525af7aa7f95548c6fc2bac2eef1d
Desktop (please complete the following information):
Additional context
I put up PR #178 which seems to fix the issue.
The text was updated successfully, but these errors were encountered: