This repository publishes the validator OpenAPI document and a small set of concrete API payload examples for integrators.
The request and response examples are also covered by ../schemas/validator-api-envelopes.schema.json, which gives tooling a machine-readable contract bundle for the public envelope layer.
For intentionally schema-invalid validator-envelope fixtures that should fail before any live route semantics matter, also inspect:
If you need source-level consumer artifacts instead of raw JSON Schema alone, also inspect:
type-projections.md../projections/typescript/validator-api.ts../projections/typescript/validator-routes.ts../projections/zod/validator-api.ts../examples/client/ts-live-validator-client.ts../examples/client/ts-parse-validate-requests.ts../examples/client/ts-parse-error-responses.ts../examples/client/zod-parse-error-responses.ts../examples/client/zod-parse-validate-request.ts../examples/client/zod-parse-validate-batch-request.ts../examples/client/zod-parse-validate-fix-request.ts../examples/client/ts-parse-validate-responses.ts../examples/client/zod-parse-validate-response.ts../examples/client/zod-parse-validate-fail-response.ts../examples/client/zod-parse-validate-batch-response.ts../examples/client/zod-parse-validate-fix-response.ts../examples/client/ts-parse-support-responses.ts../examples/client/zod-parse-support-responses.ts
If you need installed-package consumer artifacts for the bounded shared error-envelope family instead of repo-relative imports, also inspect:
npm-consumption.md../examples/client/cjs-package-error-responses.cjs../examples/client/esm-package-error-responses.mjs../examples/client/ts-package-error-responses.ts../examples/client/cjs-package-validate-request.cjs../examples/client/esm-package-validate-request.mjs../examples/client/ts-package-live-validator-client.ts../examples/client/ts-package-parse-validate-requests.ts../examples/client/cjs-package-validate-response.cjs../examples/client/esm-package-validate-response.mjs../examples/client/ts-package-validate-responses.ts
If you need compact machine-readable route data instead of full OpenAPI or prose docs, also inspect:
../references/validator-envelope-families.json../references/validator-routes.jsonroute-reference.md
The compact route layer now carries response-status-to-envelope mappings and bounded auth/query metadata, so SDK and client builders can recover practical route behavior without scraping the full OpenAPI document first.
The compact envelope-family surface publishes:
- request families:
validateSingleRequest,validateBatchRequest,validateFixRequest - response families:
validatePassResponse,validateFailResponse,validateBatchResponse,validateFixResponse,gatesResponse,statsResponse,simpleErrorResponse - shared definitions:
validationOptions,validatorIssue,warningItem,gateDescriptor
Use ../references/validator-envelope-families.json when you want those families as a compact route-linked machine-readable surface instead of walking schema defs or prose sections manually. Use ../references/validator-routes.json when you need the per-route auth, query, and response-status map that sits beside those families.
If you need a cross-language raw-JSON consumer path outside the Node runtime, also inspect:
python-consumption.md../examples/client/python-get-gates.py../examples/client/python-get-stats.py../examples/client/python-parse-validate-responses.py../examples/client/python-parse-error-responses.py../examples/client/python-parse-support-responses.py
../examples/api/validate-request.single.jsonCanonical single-capsule validation envelope.../examples/api/validate-request.batch.jsonBatch validation request with one valid and one intentionally invalid capsule.../examples/api/validate-response.pass.jsonPositive single-capsule validation response.../examples/api/validate-response.fail.jsonNegative single-capsule validation response showing an isolatedG16failure.../examples/api/validate-response.batch.jsonMixed batch response with one valid and one invalid result item.../examples/api/validate-request.fix.jsonFix-route request envelope using the intentionally invalidG16capsule.../examples/api/validate-response.fix.sample.jsonIllustrative fix-route response showing the corrected capsule payload.../examples/api/gates-response.sample.jsonSmall sample response shape forGET /api/validate/gates.../examples/api/stats-response.sample.jsonSmall sample response shape forGET /api/validate/stats.../examples/api/stats-error-response.sample.jsonBounded500support-route failure example forGET /api/validate/stats.../examples/api/error-response.sample.jsonShared generic error envelope example.../examples/api/unauthorized-response.sample.jsonSmall bounded unauthorized example for rejection-path review.../examples/api/forbidden-response.sample.jsonSmall bounded owner-role rejection example for the documented403route status.../examples/api/conflict-response.sample.jsonSmall bounded conflict example for rejection-path review.../examples/api/rate-limit-response.sample.jsonShared rate-limit envelope example.
POST /api/validateUses{ capsule, options, autoFix }.POST /api/validate/batchUses{ capsules, options }.POST /api/validate/fixThe current public example surface uses{ capsule, options }. Policy variants may exist upstream, but the public repository only schema-covers the documented example envelope.
The public repo currently includes concrete examples for all published request and support-route success envelopes documented here, plus a dedicated bounded GET /api/validate/stats failure sample and copyable live client recipes for validate, batch, fix, gates, and stats. That keeps the reference surface useful without trying to mirror every internal runtime path.
The fix response sample is intentionally illustrative: it is derived from the published OpenAPI contract and from local validator behavior on the public negative G16 example, not from a deployed public HTTP trace.
The fixtures under ../examples/api-invalid/ are different: they are intentionally not valid public request/response envelopes. They exist to teach raw-schema consumers what should be rejected directly by the envelope schema bundle.
For the higher-level fail-closed summary across validator, OpenAPI, and portability surfaces, see failure-model.md.
OpenAPI alone tells tooling what shapes exist. Example envelopes show human readers and downstream builders how those shapes feel in real use, especially when validator options or mixed batch outcomes are involved.
The dedicated API envelope schema keeps these example files machine-readable without forcing consumers to infer shape rules from prose alone.
The published validator API projections strengthen that path further by giving TypeScript and Zod consumers a public-safe source-level envelope layer for validate request families, sample-driven TypeScript and Zod request readers, a repo-relative and installed-package TypeScript fetch bridge for the published validator route family, and shared validator-route constants while staying subordinate to the stronger JSON Schema and OpenAPI surfaces.