added swagger

This commit is contained in:
2023-03-01 15:47:55 +00:00
parent c38d67a37f
commit d8f0972170
12 changed files with 186 additions and 10 deletions
+13
View File
@@ -0,0 +1,13 @@
import { withSwagger } from 'next-swagger-doc';
const swaggerHandler = withSwagger({
definition: {
openapi: '3.0.0',
info: {
title: 'NextJS Swagger',
version: '0.1.0',
},
},
apiFolder: 'pages/api',
});
export default swaggerHandler();