feat: add metadata for api doc
CI / Rust CI (push) Successful in 1m33s
Publish & Deploy / Build and Push to Registry (push) Successful in 22s
Publish & Deploy / Deploy via SSH (push) Successful in 18s

This commit is contained in:
2026-04-11 20:40:38 +02:00
parent f4da65dbc2
commit 81129d6c9c
2 changed files with 13 additions and 4 deletions
+12 -3
View File
@@ -5,12 +5,21 @@ use crate::routes;
#[derive(OpenApi)] #[derive(OpenApi)]
#[openapi( #[openapi(
info(
title = "Ollama Proxy",
description = "OpenAI-compatible proxy for local Ollama models",
version = "0.1.0",
license(
name = "MIT",
url = "https://opensource.org/licenses/MIT"
),
),
paths( paths(
routes::v1::chat::completions, routes::v1::chat::completions,
routes::v1::chat::chat_completions, routes::v1::chat::chat_completions,
// routes::v1::models::list_models, routes::v1::models::list_models,
// routes::v1::models::load_model, routes::v1::models::load_model,
// routes::v1::models::unload_model, routes::v1::models::unload_model,
), ),
components( components(
schemas( schemas(
+1 -1
View File
@@ -12,7 +12,7 @@ async fn openapi_json() -> Json<utoipa::openapi::OpenApi> {
} }
fn public_router() -> Router<AppState> { fn public_router() -> Router<AppState> {
Router::new().route("/openapi.json", get(openapi_json)) Router::new().route("/docs.json", get(openapi_json))
} }
pub fn protected_router() -> Router<AppState> { pub fn protected_router() -> Router<AppState> {