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

Function outputJsonSchema

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

Source from the content-addressed store, hash-verified

25 * Convert a Zod schema to a response-side Fastify JSON Schema object.
26 */
27export function outputJsonSchema(schema: z.ZodTypeAny): Record<string, unknown> {
28 return jsonSchemaForTarget(schema, 'output', 'draft-7');
29}
30
31/**
32 * Convert a Zod schema directly to an OpenAPI 3 schema object.

Callers 1

envelopeJsonSchemaFunction · 0.85

Calls 1

jsonSchemaForTargetFunction · 0.85

Tested by

no test coverage detected