Open LarsParTec opened 1 year ago
I did a test with the latest master and -t
works for me:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g python-fastapi -i modules/openapi-generator/src/test/resources/3_0/python-fastapi/petstore.yaml -o /tmp/pf/ -t /tmp/python-fastapi
Here is the diff in the output:
Bug Report Checklist
Description
The
openapi-generator
command line tool is generating Python FastAPI server code (python-fastapi
) from the pet store API specs. In the first run without explicit templates. In the second run with the default templates in theopenapi-generator
repository.Expected behaviour: The generated code is identical in both cases. Actual behaviour: The generated code differs.
openapi-generator version
6.6.0 on macOS 13.4.1
OpenAPI declaration file content or url
An example is given in this public repository. The current
openapi-generator
repository is added as submodule. For the example we make use of the pet store specs and the python-fastapi mustache templates.This commit shows the difference of the generated code with and without explicit
-t
templates.Generation Details
See this public repository and above.
Steps to reproduce
Run the
generate.sh
script without and with templates.Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/16200
Suggest a fix
None.