server: openapi fixes

This commit is contained in:
nym21
2025-12-16 16:41:25 +01:00
parent 032f3cb66b
commit 593af69230
16 changed files with 215 additions and 145 deletions

View File

@@ -51,7 +51,11 @@ impl ApiRoutes for ApiRouter<AppState> {
"/version",
get_with(
async |headers: HeaderMap, State(state): State<AppState>| {
state.cached_json(&headers, CacheStrategy::Static, |_| Ok(env!("CARGO_PKG_VERSION"))).await
state
.cached_json(&headers, CacheStrategy::Static, |_| {
Ok(env!("CARGO_PKG_VERSION"))
})
.await
},
|op| {
op.server_tag()