tsk-170: API documentation #178

Merged
kdeng00 merged 13 commits from tsk-170 into v0.2 2025-08-24 19:58:38 -04:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit 2bbb8a1617 - Show all commits
+3
View File
@@ -856,6 +856,9 @@ mod song_queue {
pub mod endpoint {
use axum::{Json, http::StatusCode, response::IntoResponse};
use utoipa::OpenApi;
use utoipa_swagger_ui::SwaggerUi;
use std::io::Write;
use crate::callers::song::song_queue;
+11
View File
@@ -1,6 +1,7 @@
pub mod auth;
pub mod callers;
pub mod db {
use sqlx::postgres::PgPoolOptions;
@@ -29,6 +30,16 @@ pub mod db {
}
}
#[derive(utoipa::OpenApi)]
#[openapi(
paths(crate::callers::song::endpoint::queue_song),
components(schemas(crate::callers::song::response::Response)),
tags(
(name = "queue song", description = "Start process to upload song by queueing the song")
)
)]
struct ApiDoc;
#[tokio::main]
async fn main() {
// initialize tracing