This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Description
Bug Report Checklist
Description
Invalid function names are generated from enum string values resembling "#367B9C".
openapi-generator version
latest via docker CLI
OpenAPI declaration file content or url
Minimal reproduction: gist, validated with vacuum
Generation Details
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:latest generate --global-property skipFormModel=false -i /local/color-names.json -g python -o /local/openapi-client
Steps to reproduce
After generating, install generated code and run pytest.
Output:
openapi-client\test\test_paths\test_sample_json\test_post.py:15: in <module>
from openapi_client.paths.sample_json import post # noqa: E501
E File "C:\Users\Work\Code\openapi-generator-repros\openapi-client\openapi_client\paths\sample_json\post.py", line 90
E def 67B9C(cls):
E ^
E SyntaxError: invalid decimal literal
Original bug from: OpenAPITools/openapi-generator#13942