ts/e2e-tests/runtimes/node/json-schema-to-zod-v3/README.md
Verifies that @composio/json-schema-to-zod works correctly with [email protected].
The @composio/json-schema-to-zod package must support both Zod v3 and v4. This suite ensures:
additionalProperties handling works correctly| 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 |
| Round-trip conversion | JSON Schema -> Zod -> JSON Schema preserves additionalProperties |
This test runs directly in Bun (no Docker fixtures). The test file imports @composio/json-schema-to-zod and zod-to-json-schema from the monorepo workspace:
import { jsonSchemaToZod, type JsonSchema } from '@composio/json-schema-to-zod';
import zodToJsonSchema from 'zod-to-json-schema';
Tests use bun:test assertions to verify schema conversion and round-trip behavior.
Docker with Node.js versions: current (as specified in .nvmrc).
pnpm test:e2e