MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / jsonSchema

Function jsonSchema

packages/server/src/middleware/schema.ts:20–22  ·  view source on GitHub ↗
(schema: z.ZodTypeAny)

Source from the content-addressed store, hash-verified

18 * schemas don't need it.
19 */
20export function jsonSchema(schema: z.ZodTypeAny): Record<string, unknown> {
21 return jsonSchemaForTarget(schema, 'input', 'draft-7');
22}
23
24/**
25 * Convert a Zod schema to a response-side Fastify JSON Schema object.

Callers 2

defineRouteFunction · 0.90
buildRouteSchemaFunction · 0.70

Calls 1

jsonSchemaForTargetFunction · 0.85

Tested by

no test coverage detected