Add versioning support by default, replace _Project.md with _Summary.md and _Description.md, upgrade to the latest Tortoise ORM version

This commit is contained in:
2026-07-15 23:43:31 -03:00
parent f8f6dad237
commit 6d1f73772e
22 changed files with 242 additions and 388 deletions
+6 -11
View File
@@ -2,26 +2,21 @@ from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from project.lib import settings
from project.api import docs
from project.api.errors import BaseError, NotFoundError
from project.api.lifespan import lifespan
from project.api.example.router import router as example_router
from project.api.v1 import app as app_v1
from project.api.v1.errors import NotFoundError
app = FastAPI(
debug=settings.DEBUG,
title="Project API",
description=docs.OPENAPI_DESCRIPTION,
version="1.0.0",
docs_url=None,
redoc_url="/docs",
redoc_url=None,
lifespan=lifespan,
openapi_tags=docs.OPENAPI_TAGS,
default_response_class=ORJSONResponse,
)
app.include_router(example_router)
app.add_exception_handler(BaseError, BaseError.handler)
app.add_exception_handler(404, NotFoundError.handler)
app.mount("/v1", app_v1, name="v1")