An example in an API description is the first thing a reader copies and the last thing anyone validates. It drifts: a field is renamed in the schema and left alone in the example, a status enum gains a value the example never had, a text/plain body is illustrated with a JSON object. None of that breaks a build, and all of it breaks whoever trusted the example.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.
Run the checked-in example
node bin/openapi-example-validator.mjs --spec examples/petstore.jsonScope
This section is the honest part of the README. These are the things the tool cannot conclude, whatever its exit code says.