diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index a96ee1e3..6d91e918 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -31,3 +31,7 @@ serde_json = { version = "1.0.71", optional = true } hyper = "0.14" tokio = { version = "1.14", features = ["full"] } tower = { version = "0.4", features = ["util"] } + +[package.metadata.docs.rs] +all-features = true +rustdocflags = ["--cfg", "docsrs"] diff --git a/axum-extra/src/response/erased_json.rs b/axum-extra/src/response/erased_json.rs index c66ee461..cf1b675f 100644 --- a/axum-extra/src/response/erased_json.rs +++ b/axum-extra/src/response/erased_json.rs @@ -28,6 +28,7 @@ use serde::Serialize; /// } /// } /// ``` +#[cfg_attr(docsrs, doc(cfg(feature = "erased-json")))] #[derive(Debug)] pub struct ErasedJson(serde_json::Result>);