Skip to main content

load_resolved_schema

Function load_resolved_schema 

Source
pub fn load_resolved_schema(schema_path: &Path) -> Result<Value, Error>
Expand description

Load the core schema and recursively inline every $ref: <file> reference into a single resolved document with no remaining $ref nodes.

Referenced files are resolved relative to the directory containing schema_path. This is the one place that reads subsystem schema files; downstream consumers traverse the returned tree and never handle $ref themselves. Build-time only.

ยงErrors

Returns Error::Io if schema_path or any referenced file cannot be read, and Error::Yaml if any file fails to parse. The offending path is carried in the error.