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 5 additions and 4 deletions
Showing only changes of commit 922a6b9a35 - Show all commits
-1
View File
@@ -877,7 +877,6 @@ pub mod endpoint {
use crate::callers::song::song_queue;
/// Endpoint to queue a song. Starts the process and places the song in a queue
#[utoipa::path(
post,
+5 -3
View File
@@ -29,7 +29,6 @@ pub mod db {
}
}
#[tokio::main]
async fn main() {
// initialize tracing
@@ -48,8 +47,8 @@ async fn main() {
pub mod init {
use axum::routing::{delete, get, patch, post};
use std::time::Duration;
use utoipa::OpenApi;
use tower_http::timeout::TimeoutLayer;
use utoipa::OpenApi;
use axum::http::{
HeaderValue, Method,
@@ -223,7 +222,10 @@ pub mod init {
routes()
.await
.merge(utoipa_swagger_ui::SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi()))
.merge(
utoipa_swagger_ui::SwaggerUi::new("/swagger-ui")
.url("/api-docs/openapi.json", ApiDoc::openapi()),
)
.layer(axum::Extension(pool))
.layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024))
.layer(TimeoutLayer::new(Duration::from_secs(300)))