Open julien-lenormand-se opened 6 months ago
I'm not reproducing the issue when running directly the code from the Swagger Codegen v3.0.54
tag (*NOT** the most recent, but the one corresponding to the Docker version used in the initial report).
But I'm reproducing when running the running the Docker image :
swaggerapi/swagger-codegen-cli-v3 3.0.54 17244ca249e8 4 months ago 291MB
I'll keep investigating.
cf https://hub.docker.com/r/swaggerapi/swagger-codegen-cli-v3/tags
Using the script provided to reproduce the issue, here are the results :
Hello,
Checklist from your CONTRIBUTING files :
swaggerapi/swagger-codegen-cli-v3:3.0.54
Using the
python-flask
generator, I sometimes find myself with invalid__init__.py
files, containing four NULL (0x00) bytes. When Python then tries to parse them, it fails (and thus the server does not start).Minimal reproducible example :
openapi.yml
generate_server.bash
It produces :
(if you are not familiar with
hexdump
, it prints the binary content of a file)Here we can see that the file contains four 0x00 (NULL) bytes. This is not a valid Python file.
I don't know what causes it.
Expected content : empty (0 bytes), or valid Python content (like in some other generated
__init__.py
files)Actual content : four NULL (0x00) bytes.