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

from fastapi import (  # noqa: F401
    APIRouter,
    Body,
    Depends,
    Path,
)
from generated.chat_api.chat_api.api_response import dispatch_api_response
from generated.chat_api.chat_api.app_services import ApiServices, get_api_services
from generated.chat_api.chat_api.operation_bindings import OPERATION_HTTP_BINDINGS
from generated.example.room_list_output import RoomListOutput
from pydantic import Field  # noqa: F401

router = APIRouter()


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