FE unit-тесты селекторов/api-client в CI; ADR по durable jobs, OpenAPI codegen и legacy Svelte; PR template WEB-19; процесс KPI cross-app sync. Co-authored-by: Cursor <[email protected]>
684 B
684 B
ADR-002: OpenAPI → TypeScript codegen
Status
Accepted (2026-07)
Context
HTTP SoT is docs/openapi.yaml. Frontend DTOs in apps/web/src/types/api.ts were hand-maintained and drifted.
Decision
- Generate
apps/web/src/types/api.gen.tswithopenapi-typescript(pnpm --filter @evobgp/web run openapi:gen). - Keep
api.tsas UI-facing aliases; re-exportOpenAPISchemasfor gradual adoption. - CI (
scripts/check-openapi-gen.sh) fails when gen is stale vs OpenAPI. packages/shareddeferred until Zod DTOs are needed cross-app.
Consequences
PRs that change OpenAPI must regenerate types. Hand DTOs remain until routes migrate to api.gen schemas.