Files
Agent-n8n/n8n-n8n-1.109.2/packages/@n8n/json-schema-to-zod
Yep_Q d6f48d6d14 chore: 清理macOS同步产生的重复文件
详细说明:
- 删除了352个带数字后缀的重复文件
- 更新.gitignore防止未来产生此类文件
- 这些文件是由iCloud或其他同步服务冲突产生的
- 不影响项目功能,仅清理冗余文件
2025-09-08 12:06:01 +08:00
..
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00
2025-09-08 04:48:28 +08:00

Json-Schema-to-Zod

A package to convert JSON schema (draft 4+) objects into Zod schemas in the form of Zod objects at runtime.

Installation

npm install @n8n/json-schema-to-zod

Simple example

import { jsonSchemaToZod } from "json-schema-to-zod";

const jsonSchema = {
  type: "object",
  properties: {
    hello: {
      type: "string",
    },
  },
};

const zodSchema = jsonSchemaToZod(myObject);

Overriding a parser

You can pass a function to the overrideParser option, which represents a function that receives the current schema node and the reference object, and should return a zod object when it wants to replace a default output. If the default output should be used for the node just return undefined.

Acknowledgements

This is a fork of json-schema-to-zod.