From 5427424171ed41926ece029877a1cfecec701392 Mon Sep 17 00:00:00 2001 From: prisis Date: Thu, 29 Jul 2021 16:16:11 +0200 Subject: [PATCH] fix: added missing app folder path to the api folders --- templates/integrations/swagger/create-swagger-spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/integrations/swagger/create-swagger-spec.ts b/templates/integrations/swagger/create-swagger-spec.ts index bb49a65..9f71b30 100644 --- a/templates/integrations/swagger/create-swagger-spec.ts +++ b/templates/integrations/swagger/create-swagger-spec.ts @@ -3,12 +3,12 @@ import swaggerJsdoc, { Options } from "swagger-jsdoc"; import { SwaggerOptions } from "./types"; -const API_FOLDERS = ["pages/api", "pages/**/api", "pages/**/api/**"]; +const API_FOLDERS = ["app/pages/api", "app/pages/**/api", "app/pages/**/api/**", "app/**/api/**"]; export default function createSwaggerSpec({ apiFolders = API_FOLDERS, options: swaggerOptions }: SwaggerOptions) { const folders: string[] = []; // files containing annotations as above - apiFolders?.forEach((folder) => { + apiFolders.forEach((folder) => { const apiDirectory = path.join(process.cwd(), folder); folders.push(`${apiDirectory}/*.js`, `${apiDirectory}/*.ts`);