summaryrefslogblamecommitdiff
path: root/makima/src/server/openapi.rs
blob: 3e8c06c9f1858bdd884be66d54ca91f04869675d (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                     
                                    




                                                                                                     
                                    
                          
                                                                 



                                  










                              
                                                                              


                  
//! OpenAPI documentation configuration using utoipa.

use utoipa::OpenApi;

use crate::server::handlers::listen;
use crate::server::messages::{ApiError, AudioEncoding, StartMessage, StopMessage, TranscriptMessage};

#[derive(OpenApi)]
#[openapi(
    info(
        title = "Makima Listen API",
        version = "1.0.0",
        description = "Streaming audio APIs for speech-to-text.",
        license(name = "MIT"),
    ),
    paths(
        listen::websocket_handler,
    ),
    components(
        schemas(
            ApiError,
            AudioEncoding,
            StartMessage,
            StopMessage,
            TranscriptMessage,
        )
    ),
    tags(
        (name = "Listen", description = "Speech-to-text streaming endpoints"),
    )
)]
pub struct ApiDoc;