# Generated by smithplates HTTP codegen. Do not edit.
from typing import Annotated

from fastapi import (
    APIRouter,
    Depends,
)
from pydantic import Field  # noqa: F401

from generated.petstore.api.health_check_output import HealthCheckOutput
from generated.petstore.api.petstore.api_response import dispatch_api_response
from generated.petstore.api.petstore.app_services import ApiServices, get_api_services
from generated.petstore.api.petstore.operation_bindings import OPERATION_HTTP_BINDINGS

router = APIRouter()


@router.get(
    "/health",
    responses={
        200: {"description": "Response"},
    },
    response_model_by_alias=True,
)
async def health_check(
    services: Annotated[ApiServices, Depends(get_api_services)],
) -> HealthCheckOutput:
    return dispatch_api_response(
        await services.health_api.health_check(),
        OPERATION_HTTP_BINDINGS["health_check"],
    )
