diff --git a/api-error/Cargo.toml b/api-error/Cargo.toml index 94f8e8e..1f859c7 100644 --- a/api-error/Cargo.toml +++ b/api-error/Cargo.toml @@ -25,7 +25,7 @@ trybuild = "1" axum = { version = "0.8", default-features = false, features = ["json"] } [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(readme_doctest)'] } +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(readme_doctest)', 'cfg(docsrs)'] } [features] default = ["derive"] @@ -36,3 +36,7 @@ axum = [ "dep:serde_json", "api-error-derive?/axum", ] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/api-error/src/lib.rs b/api-error/src/lib.rs index 1eb13c8..3710f84 100644 --- a/api-error/src/lib.rs +++ b/api-error/src/lib.rs @@ -1,6 +1,7 @@ // Copyright 2025-Present Centreon // SPDX-License-Identifier: Apache-2.0 #![warn(clippy::pedantic)] +#![cfg_attr(docsrs, feature(doc_cfg))] //! # Api Error //!