Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
fix: added missing app folder path to the api folders
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis committed Jul 29, 2021
1 parent 6c729a4 commit 5427424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/integrations/swagger/create-swagger-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit 5427424

Please sign in to comment.