mockforge_core/
template_expansion.rs

1//! Template expansion utilities for request context variables
2//!
3//! This module re-exports Send-safe template expansion from mockforge-template-expansion.
4//! The actual implementation is in a separate crate to avoid Send issues with rng().
5//!
6//! Import directly from mockforge-template-expansion crate:
7//! ```rust
8//! use mockforge_template_expansion::expand_templates_in_json;
9//! ```
10
11/// Expand template variables in a JSON value recursively using request context
12///
13/// **Note**: This function has been moved to `mockforge-template-expansion` crate.
14/// Use `mockforge_template_expansion::expand_templates_in_json` instead.
15///
16/// This is a placeholder function for backwards compatibility that will panic if called.
17///
18/// # Arguments
19/// * `_value` - JSON value to process (unused)
20/// * `_context` - Request context for template variable expansion (unused)
21///
22/// # Returns
23/// This function will panic with a message directing users to use the new crate.
24///
25/// # Panics
26/// Always panics with a message to use `mockforge_template_expansion::expand_templates_in_json` instead.
27#[deprecated(note = "Use mockforge_template_expansion::expand_templates_in_json instead")]
28pub fn expand_templates_in_json(
29    _value: serde_json::Value,
30    _context: &crate::ai_response::RequestContext,
31) -> serde_json::Value {
32    // This is a placeholder - the actual implementation is in mockforge-template-expansion
33    // This function should not be called directly. Use mockforge_template_expansion::expand_templates_in_json instead.
34    unimplemented!("expand_templates_in_json has been moved to mockforge-template-expansion crate. Use mockforge_template_expansion::expand_templates_in_json instead.")
35}