MCPcopy Create free account
hub / github.com/cosdata/cosdata / api_docs_module

Function api_docs_module

src/api/docs.rs:8–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6use utoipa::OpenApi;
7
8pub(crate) fn api_docs_module() -> Scope {
9 web::scope("/api-docs")
10 .route("/openapi.json", web::get().to(openapi_json))
11 .route("/auth/openapi.json", web::get().to(auth_openapi_json))
12 .route(
13 "/collections/openapi.json",
14 web::get().to(collections_openapi_json),
15 )
16 .route("/indexes/openapi.json", web::get().to(indexes_openapi_json))
17 .route("/search/openapi.json", web::get().to(search_openapi_json))
18 .route(
19 "/transactions/openapi.json",
20 web::get().to(transactions_openapi_json),
21 )
22 .route("/vectors/openapi.json", web::get().to(vectors_openapi_json))
23 .route(
24 "/versions/openapi.json",
25 web::get().to(versions_openapi_json),
26 )
27 .route(
28 "/streaming/openapi.json",
29 web::get().to(streaming_openapi_json),
30 )
31}
32
33async fn openapi_json() -> HttpResponse {
34 HttpResponse::Ok().json(CombinedApiDoc::openapi())

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected