feat: Make swagger an optional dependency, enabled by default

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-10 10:24:21 -03:00
parent ea817ad629
commit 146bd2e569
2 changed files with 15 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ tokio-util = "0.7.16"
tower = "0.5.2"
tower-http = { version = "0.6.6", features = ["cors", "fs", "trace"] }
utoipa = { version = "5.4.0", features = ["axum_extras"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"], optional = true }
uzers = "0.12.1"
which = "8.0.0"
xdg = "2.5.2"
@@ -68,8 +68,8 @@ pest = "2.8.1"
pest_derive = "2.8.1"
[features]
# Default features include core compression engines
default = ["gzip", "lz4"]
# Default features include core compression engines and swagger UI
default = ["gzip", "lz4", "swagger"]
# Compression features
gzip = ["flate2"]
@@ -88,6 +88,9 @@ magic = ["dep:magic"]
# MCP feature (Model Context Protocol support)
mcp = ["dep:rmcp"]
# Swagger UI feature
swagger = ["dep:utoipa-swagger-ui"]
[dev-dependencies]
tempfile = "3.3.0"
rand = "0.8.5"