Syntax and schema answer different questions
YAML parsing identifies mappings, sequences, and scalar values. JSON Schema can then require properties, constrain types and ranges, and reject unexpected members for a particular contract.
Diagnostics use instance paths so a failing value can be found without copying document content into an error message or telemetry event.