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

from fastapi import (
    APIRouter,
    Depends,
)
from generated.example.ping_output import PingOutput
from generated.ping_api.ping_api.api_response import dispatch_api_response
from generated.ping_api.ping_api.app_services import ApiServices, get_api_services
from generated.ping_api.ping_api.operation_bindings import OPERATION_HTTP_BINDINGS
from pydantic import Field  # noqa: F401

router = APIRouter()


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