Skip to main content

validate_with_schema

Function validate_with_schema 

Source
pub fn validate_with_schema(
    content_dir: &Path,
    schema_path: &Path,
) -> Result<()>
Expand description

Validates every .md file under content_dir against the schema at schema_path.

Use this entry point when the schema must live outside content_dir — for example, because staticdatagen::compile reads every file in content_dir and would fail to parse a non-Markdown schema file as content.

§Errors

Returns Err if the schema can’t be loaded or any content file fails validation.