@developer-overheid-nl/don-checker
v1.1.0
Published
[](https://www.npmjs.com/package/@developer-overheid-nl/don-checker)
Readme
DON Checker
Validates OpenAPI specifications against the API Design Rules, plus publiccode.yml files.
Built on @geonovum/standards-checker; see its documentation for the validation engine, CLI toolkit, and web UI framework.
Release notes are in CHANGELOG.md; see Versioning & releasing for how it is produced.
Demo: https://developer-overheid-nl.github.io/don-checker/
CLI
Quick start (via npx)
# From a local file (ADR, default version 2.1.0)
npx @developer-overheid-nl/don-checker@latest validate --standard adr --input ./openapi.json
# Pin a specific version
npx @developer-overheid-nl/don-checker@latest validate --standard adr --version 2.0.2 --input ./openapi.json
# From stdin
cat openapi.json | npx @developer-overheid-nl/don-checker@latest validate --standard adrInstall globally
npm install -g @developer-overheid-nl/don-checker@latest
don-checker validate --standard adr --input ./openapi.jsonFrom a local clone
pnpm install
pnpm build:cli
node dist/cli.mjs validate --standard adr --input ./openapi.jsonAvailable standards:
| Standard (--standard) | Versions (--version) | Default | Legacy --ruleset |
| ----------------------- | ------------------------------ | ------- | ------------------------------------ |
| adr | 2.0.2, 2.1.0, werkversie | 2.1.0 | adr-20, adr-21, adr-werkversie |
| publiccode | 0.5, 0.7 | 0.7 | publiccode-05, publiccode-07 |
--version is optional; omitting it selects the latest final version (for adr, that is 2.1.0).
The old --ruleset <slug> flag still works as a deprecated alias — it prints a warning on stderr
and resolves the old slug to the same standard/version (e.g. --ruleset adr-20 ==
--standard adr --version 2.0.2; --ruleset adr-werkversie == the werkversie draft).
CLI flags
| Flag | Description | Default |
| ------------------- | ------------------------------------------------- | ------------ |
| --standard <slug> | Standard to validate against | (required) |
| --version <id> | Version of the standard | latest final |
| --ruleset <slug> | Deprecated alias for --standard/--version | — |
| --input <file\|-> | Input file, URL, or - for stdin | - |
| --format <fmt> | Output: table, json | table |
| --fail-on <level> | Exit code policy: none, warn, error | error |
Exit codes: 0 = pass, 1 = failed per --fail-on policy, >1 = unexpected error.
Development
Prerequisites
- Node.js 24+
- pnpm 10+
Setup
pnpm installCommands
| Command | Description |
| ---------------- | ------------------------------------------ |
| pnpm dev | Vite dev server with hot reload |
| pnpm build | Full build: tsc + CLI bundle + vite webapp |
| pnpm build:cli | Build only the CLI binary (dist/cli.mjs) |
| pnpm test | Vitest in watch mode |
| pnpm test run | Vitest single run |
| pnpm lint | Check for lint and formatting issues |
| pnpm lint:fix | Auto-fix lint and formatting issues |
Versioning & releasing
Versioning, the changelog, and publishing are driven by Changesets. Describing a change is decoupled from cutting a release:
Add a changeset with your change. Run
pnpm changeset, pick the bump (major/minor/patch), and write a one-line summary. This creates a.changeset/<name>.mdfile — commit it with your PR. Omit only for changes that don't affect the published package (CI, internal docs, tests).Cut the release. Run
pnpm version-packages(alias forchangeset version). It consumes the pending.changeset/*.mdfiles, bumpspackage.json, and prepends the summaries toCHANGELOG.md. Review and commit the result. Don't hand-edit theversionfield — Changesets owns it.Publish. Tag the released version and push; the CI workflow verifies
package.jsonmatches the tag, builds, tests, publishes to npm, and deploys to GitHub Pages:git tag v1.1.0 git push --tagspnpm release(pnpm build && changeset publish) publishes to npm locally if you need to bypass the workflow (it does not deploy Pages).
Pre-releases
To publish -beta.N prereleases before a final release, enter Changesets pre-release mode first; steps 2–3 above then produce prereleases until you exit:
pnpm changeset pre enter beta # writes .changeset/pre.json — commit itWhile in pre mode:
pnpm version-packagescomputes e.g.1.1.0-beta.0; running it again after new changesets land bumps to-beta.1, and so on. Final releases are blocked until you exit pre mode.- Tag and push as usual (
git tag v1.1.0-beta.0). The publish workflow publishes any version containing a-under the npm dist-tagbeta, solatestkeeps pointing at the last final release. - Consumed
.changeset/*.mdfiles are kept (tracked in.changeset/pre.json) so the final release's changelog can aggregate them — don't delete them by hand. - The
-beta.Ncounter is derived from the currentpackage.jsonversion — one more reason never to hand-editversion; a hand-set version shifts the counter.
When the release is ready to go final, exit pre mode and version again:
pnpm changeset pre exit # removes .changeset/pre.json
pnpm version-packages # computes the final version and cleans up the consumed changesetsCommit, tag (v1.1.0), and push — the same workflow now publishes under latest.
