pub fn bundle_refs(
schema: Value,
base_dir: &Path,
fetch_policy: FetchPolicy,
load_budget: LoadBudget,
) -> EngineResult<Value>Expand description
Resolve external $refs into root-level $defs entries while preserving
internal refs as refs.
The result is self-contained: file and URL references are loaded through
the same Retrieve implementation used by flatten_refs, but the
referenced schema is re-homed under #/$defs/... instead of being inlined
at each use site.
ยงErrors
Returns an error when base_dir cannot be represented as an absolute file
URI, a reference URI is malformed, a referenced document cannot be
retrieved or parsed, or a load budget is exceeded.