We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config/router.py
Describe the bug
$ fastapi-mvc generate controller demo method1 method2:post [INFO] Running controller generator (.venv) $ fastapi-mvc generate controller demo method1 method2:post [INFO] Running controller generator $ cat test_app/config/router.py """Application routes configuration. In this file all application endpoints are being defined. """ from fastapi import APIRouter from test_app.app.controllers import demo from test_app.app.controllers import demo from test_app.app.controllers.api.v1 import ready router = APIRouter(prefix="/api") router.include_router(ready.router, tags=["ready"]) router.include_router(demo.router) router.include_router(demo.router)
Expected behavior
Controller generator should validate if an entry already exists. If --skip flag is provided, don't override; else override.
--skip
To Reproduce
Run the same controller generator twice.
Environment
3.9.6
Linux-5.10.106-x86_64-with-glibc2.33
0.10.0
Additional context
This is implemented in controller generator template post_gen_project.py hook.
post_gen_project.py
The text was updated successfully, but these errors were encountered:
Merge pull request #92 from rszamszur/fix/#78
0d80713
Fix controller generator creating duplicates entries in `config/router.py`
rszamszur
Successfully merging a pull request may close this issue.
Describe the bug
Expected behavior
Controller generator should validate if an entry already exists. If
--skip
flag is provided, don't override; else override.To Reproduce
Run the same controller generator twice.
Environment
3.9.6
Linux-5.10.106-x86_64-with-glibc2.33
0.10.0
Additional context
This is implemented in controller generator template
post_gen_project.py
hook.The text was updated successfully, but these errors were encountered: