UNPKG

@mseep/apisix-mcp

Version:

[![smithery badge](https://smithery.ai/badge/@api7/apisix-mcp)](https://smithery.ai/server/@api7/apisix-mcp)

10 lines (9 loc) 299 B
import { z } from "zod"; export const createNullablePatchSchema = (schema) => { const shape = schema.shape; const nullableShape = Object.fromEntries(Object.entries(shape).map(([key, value]) => [ key, value.nullable() ])); return z.object(nullableShape).partial(); };