generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,10 @@ | ||
from fastapi import FastAPI, APIRouter | ||
from .routers.v1 import case_information as case_information_v1, security as security_v1 | ||
from fastapi import FastAPI | ||
from .config.docs import config as docs_config | ||
|
||
|
||
def v1_router(): | ||
router = APIRouter(prefix="/v1") | ||
router.include_router(case_information_v1.router) | ||
router.include_router(security_v1.router) | ||
return router | ||
|
||
|
||
def v2_router(): | ||
router = APIRouter(prefix="/v2") | ||
router.include_router(case_information_v1.router) | ||
return router | ||
from .routers.v1 import router as v1_router | ||
|
||
|
||
def create_app() -> FastAPI: | ||
app = FastAPI(**docs_config) | ||
app.include_router(v1_router()) | ||
app.include_router(v1_router) | ||
|
||
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from fastapi import APIRouter | ||
from . import case_information, security | ||
|
||
router = APIRouter(prefix="/v1") | ||
router.include_router(case_information.router) | ||
router.include_router(security.router) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters