It is very difficult to "merge" the changes, made by code generation,
and the changes, made by developers. It would be very useful to
separate the generated code and the code written by developers. In
addition this would remove the necessity to track the generated code.
Pyhton (since 3.6) has a hook, __init_subclasses__, that could be used
to solve exactly this problem.
The classes from *_base.py should be implemented in an ns package that is specified
by the additional parameter ("-p fastapiImplementationPackage=example_name").
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Ignore some flake8 warnings
1. Some of the "imported but not used" warnings are there because
it is not easy to express what should be imported in mustache template
language. These warnings are silenced in order to keep the templates
morre readable.
2. Single quotes -> Double quotes (for consistency).
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added flake8 config
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Set extra constraints on values
It is important to set all constraints (pattern, greater than, etc.)
on values of all arguments, because FastAPI can handle them automatically.
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Updated samples
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added new generator
See https://fastapi.tiangolo.com/ for more details about FastAPI
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
* [python-fastapi] Added samples
Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>