Open signebedi opened 3 months ago
One question: can we use a blueprint approach like in flask? Potentially useful: https://fastapi.tiangolo.com/reference/apirouter/.
So this will look something like having separate scripts for ui_form, ui_auth, ui_admin; api_form, api_auth, and api_admin.
Each of these can include an API router:
from fastapi import APIRouter
my_router = APIRouter()
@router.get(...)
And then, in init.py, we can add these routes:
from libreforms_fastapi.app.routes.api_form import my_router
app.include_router(my_router)
There is a lot of boilerplate in
app/__init__.py
right now. We should think about ways to reduce it.