Skip to content

Commit ce73a92

Browse files
committed
Resolve rustapi_validate/core paths dynamically
Use proc_macro_crate to detect how validation/core/async_trait crates are referenced and emit the correct paths for generated code. The macros crate now computes validate_path, core_path, and async_trait_path and threads them into generation functions (generate_rule_validation, generate_async_rule_validation and derive_validate) so the Validate/AsyncValidate/Validatable impls work whether the consumer depends on rustapi-rs or the underlying crates directly. Added rustapi_validate to rustapi-core::__private and re-exported async_trait in rustapi-rs::__private to support those resolution strategies.
1 parent c1f185d commit ce73a92

File tree

3 files changed

+178
-54
lines changed

3 files changed

+178
-54
lines changed

crates/rustapi-core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub mod __private {
9393
pub use crate::auto_schema::AUTO_SCHEMAS;
9494
pub use linkme;
9595
pub use rustapi_openapi;
96+
pub use rustapi_validate;
9697
}
9798

9899
// Public API

0 commit comments

Comments
 (0)