OpenAPI sync & codegen
Contributors pin NENE2 OpenAPI in this repo and regenerate TypeScript types and schema guards.
Sibling layout
text
../NENE2/docs/openapi/openapi.yaml # contract source
../nene2-js/contracts/openapi.yaml # pinned copy for CICommands
bash
npm run contracts:sync # refresh pin + contracts/openapi.yaml
npm run codegen # src/generated/openapi.ts (types)
npm run codegen:check # types drift gate (in npm run check)
npm run codegen:guards # src/generated/guards.ts (validators)
npm run codegen:guards:checkWorkflow on NENE2 bump
- NENE2 merges OpenAPI change and tags a release.
- Open an Issue in nene2-js to sync.
contracts:sync→codegen→codegen:guards→npm run check.- PR updates guards/types if the public client surface changed.
Codegen is types (codegen, ADR 0006) + guards (codegen:guards, ADR 0007). createNene2Client and src/problem/guards.ts stay hand-maintained.
Pin file
contracts/nene2-openapi-pin.json records git ref, OpenAPI info version, and SHA-256 of the YAML. syncedFrom stays a relative sibling path, not an absolute machine path.