cal.pub0.org/pages/api/docs.ts

16 lines
359 B
TypeScript
Raw Normal View History

import pjson from "@/package.json";
import { withSwagger } from "next-swagger-doc";
const swaggerHandler = withSwagger({
definition: {
openapi: "3.0.0",
info: {
title: `${pjson.name}: ${pjson.description}`,
version: pjson.version,
},
tags: ["users", "teams"],
},
apiFolder: "pages/api",
});
export default swaggerHandler();