-
-
Notifications
You must be signed in to change notification settings - Fork 208
Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.6.2
Plugin version
No response
Node.js version
24
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
26.0
Description
Unclear why this suddenly started to throw an error.
FastifyError: Failed building the serialization schema for GET: /api/mcp/v1/servers, due to error Zod schema of type `custom` at properties > zodOpenApiCreateSchema > properties > servers > items > properties > tools > items > properties > inputSchema cannot be represented in OpenAPI. Please assign it metadata with `.meta()`
Link to code that reproduces the bug
N/A
Expected Behavior
I should be able to use custom types.
const McpServerToolModelZodSchema = z
.object({
description: z.string().nullable(),
inputSchema: z.custom<JSONSchema7Object>().meta({
description: 'MCP server tool input schema',
}),
name: z.string(),
})
.meta({
description: 'MCP server tool',
ref: 'McpServerTool',
});Metadata
Metadata
Assignees
Labels
No labels