diff --git a/Cargo.toml b/Cargo.toml index d29dd79..0a35e30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "actix-web-validation" description = "A common validation interface for actix-web applications" -version = "0.1.0" +version = "0.1.1" edition = "2021" authors = ["Ross Sullivan "] repository = "https://github.com/ranger-ross/actix-web-validation" @@ -23,3 +23,6 @@ validator = ["dep:validator"] # Use garde crate (https://github.com/jprochazk/garde) as the validation implmentation garde = ["dep:garde"] +[package.metadata.docs.rs] +all-features = true + diff --git a/README.md b/README.md index 544b00f..8af5b58 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ # Actix Web Validation -> [!WARNING] -> This library is currently in early access and may recieve breaking changes. Use at your own risk. - Request validation for actix-web. + +#### WARNING + +This library is currently in early access and may recieve breaking changes. + + ## Supported Validation Libraries * [validator](https://github.com/Keats/validator) diff --git a/src/garde.rs b/src/garde.rs index 0e3b730..e26b4b6 100644 --- a/src/garde.rs +++ b/src/garde.rs @@ -1,3 +1,6 @@ +//! Validation for the [garde](https://docs.rs/garde/latest/garde) crate. +//! Requires the `garde` feature flag + use ::garde::Validate; use actix_web::dev::{ServiceFactory, ServiceRequest}; use actix_web::http::StatusCode; diff --git a/src/lib.rs b/src/lib.rs index 1d8e365..823fdb7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,3 +4,6 @@ pub mod garde; #[cfg(feature = "validator")] pub mod validator; + +#[cfg(feature = "docsrs")] +compile_error!("doc"); diff --git a/src/validator.rs b/src/validator.rs index 747dda1..93d72bc 100644 --- a/src/validator.rs +++ b/src/validator.rs @@ -1,3 +1,6 @@ +//! Validation for the [validator](https://docs.rs/validator/latest/validator) crate. +//! Requires the `validator` feature flag + use ::validator::Validate; use actix_web::dev::{ServiceFactory, ServiceRequest}; use actix_web::http::StatusCode;