OpenAPITools / OpenAPITools/openapi-generator
[REQ] [Python-Flask] Request for a independent "init" template for controllers.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
When we use the OpenAPI Generator to generate a python-flask server with the mustache tempalte, we find that the init.py for the whole package and the init.py for controllers are using the same mustache template.
Did I miss something or is it possible to have a independent template for that?
I think one of the possible solution is to add a seperated mustache template for it. It should be similar to the separated init.py for models folder and test folder.
What I want is that the init.py for the whole package and the init.py for controllers in that package can have separated and independent mustache templates.
Here is the link for model init.py.
https://github.com/OpenAPITools/openapi-generator/blob/ae6abfc5f3ffd3a5587a2417cf7b70bba82bea90/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java#L54
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PythonFlaskConnexionServerCodegen.java and compare the existing model and test init template handling with the controller and package init generation. Trace the referenced mustache template usage and verify that generated packages can use independent init templates for the package and controllers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, java, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100