tsk-170: Adding code to document API

This commit is contained in:
kdeng00
2025-08-19 13:09:53 -04:00
parent 7adbf6332a
commit 2bbb8a1617
2 changed files with 14 additions and 0 deletions
+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