pub trait ResponseRewriter: Send + Sync {
// Required methods
fn expand_tokens(&self, body: &mut Value);
fn apply_overrides(
&self,
operation_id: &str,
tags: &[String],
path: &str,
body: &mut Value,
);
}Expand description
Hook for post-generation response body mutation used by the OpenAPI
router. Implementations are called conditionally — expand_tokens only
when template expansion is enabled for the current context, and
apply_overrides only when operation overrides are enabled.
Required Methods§
Sourcefn expand_tokens(&self, body: &mut Value)
fn expand_tokens(&self, body: &mut Value)
Expand template tokens (e.g. {{uuid}}, {{now}}) in-place inside
the response body.