Overview
How It Works
OpenAPI Specification
Adding New Endpoints
import { z, registry } from "../openapi";
export const MyResponseSchema = z.object({
id: z.string(),
name: z.string(),
}).openapi("MyResponse");
registry.registerPath({
method: "get",
path: "/api/my-endpoint",
tags: ["MyTag"],
summary: "Brief description",
description: "Detailed description",
responses: {
200: {
description: "Success response",
content: {
"application/json": {
schema: MyResponseSchema,
},
},
},
},
});Schema Validation
CI/CD Integration
Last updated