diff --git a/Cargo.lock b/Cargo.lock index 95bd2c0f5..d694f6d02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,6 +71,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "zstd", ] [[package]] @@ -92,6 +93,7 @@ dependencies = [ "bytestring", "cfg-if", "http 0.2.11", + "regex", "regex-lite", "serde", "tracing", @@ -197,6 +199,7 @@ dependencies = [ "mime", "once_cell", "pin-project-lite", + "regex", "regex-lite", "serde", "serde_json", @@ -3457,6 +3460,7 @@ dependencies = [ "urlencoding", "utoipa", "utoipa-rapidoc", + "utoipa-redoc", "utoipa-scalar", "uuid", "wiremock", @@ -5883,6 +5887,18 @@ dependencies = [ "utoipa", ] +[[package]] +name = "utoipa-redoc" +version = "4.0.1-rc.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4375bb6b0cb78a240c973f5e99977c482f3e92aeea1907367caa28776b9aaf9" +dependencies = [ + "actix-web", + "serde", + "serde_json", + "utoipa", +] + [[package]] name = "utoipa-scalar" version = "0.2.0-rc.0" diff --git a/meilisearch/Cargo.toml b/meilisearch/Cargo.toml index 8c74facbd..795995399 100644 --- a/meilisearch/Cargo.toml +++ b/meilisearch/Cargo.toml @@ -107,6 +107,7 @@ roaring = "0.10.2" utoipa = { version = "5.0.0-rc.0", features = ["actix_extras", "macros", "non_strict_integers", "preserve_order", "uuid", "time", "openapi_extensions"] } utoipa-scalar = { version = "0.2.0-rc.0", features = ["actix-web"] } utoipa-rapidoc = { version = "4.0.1-rc.0", features = ["actix-web"] } +utoipa-redoc = { version = "4.0.1-rc.0", features = ["actix-web"] } [dev-dependencies] actix-rt = "2.10.0" diff --git a/meilisearch/src/routes/mod.rs b/meilisearch/src/routes/mod.rs index 7254cac9c..cb9d159df 100644 --- a/meilisearch/src/routes/mod.rs +++ b/meilisearch/src/routes/mod.rs @@ -26,6 +26,8 @@ use tracing::debug; use utoipa::OpenApi; use utoipa::ToSchema; use utoipa_rapidoc::RapiDoc; +use utoipa_redoc::Redoc; +use utoipa_redoc::Servable; use utoipa_scalar::{Scalar, Servable as ScalarServable}; use self::api_key::KeyView; @@ -71,7 +73,8 @@ pub fn configure(cfg: &mut web::ServiceConfig) { cfg.service(web::scope("/tasks").configure(tasks::configure)) // done .service(Scalar::with_url("/scalar", openapi.clone())) // done - .service(RapiDoc::with_openapi("/api-docs/openapi.json", openapi).path("/rapidoc")) // done + .service(RapiDoc::with_openapi("/api-docs/openapi.json", openapi.clone()).path("/rapidoc")) // done + .service(Redoc::with_url("/redoc", openapi)) .service(web::resource("/health").route(web::get().to(get_health))) // done .service(web::scope("/logs").configure(logs::configure)) // done .service(web::scope("/keys").configure(api_key::configure))