ICN Gateway OpenAPI Sync
Treat API drift as a blocking integration defect.
Trigger Conditions
Use this skill when changes touch:
icn/crates/icn-gateway/**- shared API models consumed by gateway endpoints
- auth/scopes/status codes that affect endpoint contracts
Workflow
- Validate gateway behavior.
bash1cd icn 2cargo test -p icn-gateway --features sled-storage
- Regenerate OpenAPI from source of truth.
bash1cd icn 2cargo build -p icnctl 3./target/debug/icnctl api export-openapi -o ../docs/api/openapi.generated.yaml
- Regenerate TypeScript types.
bash1cd sdk/typescript 2npm ci 3npm run generate-types 4npm run check-types 5npm run build 6npm test 7npm run lint
- Confirm drift status.
bash1git status --short docs/api/openapi.generated.yaml sdk/typescript
- If generated artifacts changed, include them in the same PR.
- If artifacts did not change, state that explicitly.
- Validate docs alignment.
- Update docs for changed semantics or response behavior.
- Ensure auth gating semantics match implementation.
Guardrails
- Do not hand-edit generated OpenAPI/types.
- Do not hide API changes by skipping regeneration.
- Keep error/status semantics explicit and documented.
Output Contract
Return:
- whether gateway API surface changed,
- generated files changed or unchanged,
- commands run with pass/fail outcome,
- follow-up docs/spec tasks if any.