ts/e2e-tests/runtimes/node/json-schema-to-zod-v4/README.md
Verifies that @composio/json-schema-to-zod works correctly with zod@4.
The @composio/json-schema-to-zod package must support both Zod v3 and v4. This suite ensures:
additionalProperties handling works correctly with Zod v4's API| Test | Description |
|---|---|
| Basic string schema | Converts { type: 'string' } and validates |
| Object schema | Required fields, nested properties, validation constraints |
| Array schema | Typed array items with validation |
| Email format | Format validation for email strings |
| Nested schemas | Complex nested objects and arrays |
| anyOf schemas | Union type conversion |
| additionalProperties | Strict, passthrough, and typed catchall modes |
| Complex nested arrays | Arrays of objects with nested arrays |
| Union with constraints | anyOf with minLength, minimum, and required fields |
This test runs directly in Bun (no Docker fixtures). The test file imports @composio/json-schema-to-zod from the monorepo workspace:
import { jsonSchemaToZod, type JsonSchema } from '@composio/json-schema-to-zod';
Tests use bun:test assertions to verify schema conversion and parsing behavior.
Docker with Node.js versions: current (as specified in .nvmrc).
pnpm test:e2e