@apivexa/validator
v0.1.4
Published
> Validates generated API documentation against the OpenAPI source — catches missing endpoints, schemas, and potential hallucinations.
Readme
@apivexa/validator
Validates generated API documentation against the OpenAPI source — catches missing endpoints, schemas, and potential hallucinations.
Part of ApiVexa — AI-powered API User Guide Generator.
Install
npm install @apivexa/validatorWhat it checks
| Check | Description | |-------|-------------| | Missing endpoint | Operation in spec not documented | | Missing parameter | Required parameter not mentioned | | Missing response | Documented status code absent from guide | | Missing schema | Referenced model not described | | Incorrect HTTP method | Wrong verb in the generated doc | | Incorrect path | Path string doesn't match spec | | Unsupported claim | Content not traceable to the spec |
Usage
import { validateDocument } from '@apivexa/validator';
const report = validateDocument(documentIr, normalizedApi);
console.log(report.valid); // true | false
console.log(report.issues.length); // 0
console.log(report.summary);
// { totalNodes: 84, verified: 84, missing: 0, aiInferences: 3 }