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

from fastapi import (  # noqa: F401
    APIRouter,
    Depends,
    Path,
)
from generated.example.stream_list_output import StreamListOutput
from generated.stream_api.stream_api.api_response import dispatch_api_response
from generated.stream_api.stream_api.app_services import ApiServices, get_api_services
from generated.stream_api.stream_api.operation_bindings import OPERATION_HTTP_BINDINGS
from pydantic import Field  # noqa: F401

router = APIRouter()


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