docs: Update API Docs (#3856)

This commit is contained in:
Michael Genson
2024-07-08 05:01:31 -05:00
committed by GitHub
parent ca1ab33291
commit 17f9eef551
8 changed files with 18 additions and 17 deletions

View File

@@ -131,7 +131,7 @@ class BaseCrudController(BaseUserController):
Base class for all CRUD controllers to facilitate common CRUD functions.
"""
event_bus: EventBusService = Depends(EventBusService.create)
event_bus: EventBusService = Depends(EventBusService.as_dependency)
def publish_event(self, event_type: EventTypes, document_data: EventDocumentDataBase, message: str = "") -> None:
self.event_bus.dispatch(

View File

@@ -6,7 +6,7 @@ from mealie.routes._base import BaseAdminController, controller
from mealie.schema.analytics.analytics import MealieAnalytics
from mealie.services.analytics.service_analytics import AnalyticsService
router = APIRouter(prefix="/analytics")
router = APIRouter(prefix="/analytics", include_in_schema=False) # deprecated - use statistics route instead
@controller(router)

View File

@@ -35,7 +35,7 @@ router = APIRouter(
@controller(router)
class GroupEventsNotifierController(BaseUserController):
event_bus: EventBusService = Depends(EventBusService.create)
event_bus: EventBusService = Depends(EventBusService.as_dependency)
@cached_property
def repo(self):

View File

@@ -221,6 +221,6 @@ def mount_spa(app: FastAPI):
global __contents
__contents = pathlib.Path(__app_settings.STATIC_FILES).joinpath("index.html").read_text()
app.get("/g/{group_slug}/r/{recipe_slug}")(serve_recipe_with_meta)
app.get("/g/{group_slug}/shared/r/{token_id}")(serve_shared_recipe_with_meta)
app.get("/g/{group_slug}/r/{recipe_slug}", include_in_schema=False)(serve_recipe_with_meta)
app.get("/g/{group_slug}/shared/r/{token_id}", include_in_schema=False)(serve_shared_recipe_with_meta)
app.mount("/", SPAStaticFiles(directory=__app_settings.STATIC_FILES, html=True), name="spa")

View File

@@ -15,7 +15,7 @@ router = APIRouter(prefix="/register")
@controller(router)
class RegistrationController(BasePublicController):
event_bus: EventBusService = Depends(EventBusService.create)
event_bus: EventBusService = Depends(EventBusService.as_dependency)
@router.post("", response_model=UserOut, status_code=status.HTTP_201_CREATED)
def register_new_user(self, data: CreateUserRegistration):

View File

@@ -6,4 +6,4 @@ prefix = "/validators"
router = APIRouter()
router.include_router(validators.router, prefix=prefix, tags=["Validators"])
router.include_router(validators.router, prefix=prefix, tags=["Validators"], include_in_schema=False)