Task(api-contract): remove unused zod dependency #7

Open
opened 2026-09-20 05:57:56 +00:00 by araemer · 0 comments
Owner

api-contract/package.json declares zod as a dependency, but grep -rn "zod" api-contract/src/ finds zero usages anywhere in the contract source. CLAUDE.md and docs/api-conventions.md both explicitly state the contract 'uses @ts-rest/core with plain TypeScript interfaces (no Zod, no code generation)' — the dependency contradicts the documented convention.

Found during the recipe-backend/recipe-app contract-onboarding audit (recipe-backend PR #13, docs/plans/onboarding-integration.md → Audit Results). Not actioned there since it requires changing api-contract/package.json in this repo.

Fix: remove zod from api-contract/package.json's dependencies and regenerate api-contract/package-lock.json. Note: both recipe-backend and recipe-app currently declare @ts-rest/core/zod as their own direct dependencies too (to satisfy npm ci's lockfile validation for the file: dependency's transitive deps — see docs/adr/2026-09-19-contract-ci-install-step.md) — check whether removing zod from api-contract has any knock-on effect there, though it should not since those are independent declarations.

`api-contract/package.json` declares `zod` as a dependency, but `grep -rn "zod" api-contract/src/` finds zero usages anywhere in the contract source. `CLAUDE.md` and `docs/api-conventions.md` both explicitly state the contract 'uses `@ts-rest/core` with plain TypeScript interfaces (no Zod, no code generation)' — the dependency contradicts the documented convention. Found during the `recipe-backend`/`recipe-app` contract-onboarding audit (`recipe-backend` PR #13, `docs/plans/onboarding-integration.md` → Audit Results). Not actioned there since it requires changing `api-contract/package.json` in this repo. **Fix:** remove `zod` from `api-contract/package.json`'s `dependencies` and regenerate `api-contract/package-lock.json`. Note: both `recipe-backend` and `recipe-app` currently declare `@ts-rest/core`/`zod` as their own direct dependencies too (to satisfy `npm ci`'s lockfile validation for the `file:` dependency's transitive deps — see `docs/adr/2026-09-19-contract-ci-install-step.md`) — check whether removing `zod` from `api-contract` has any knock-on effect there, though it should not since those are independent declarations.
araemer changed title from api-contract: remove unused zod dependency to Task(api-contract): remove unused zod dependency 2026-10-02 20:17:53 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
araemer/recipe-platform#7
No description provided.