File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
packages/docusaurus-plugin-openapi/src/openapi Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 77
88import path from "path" ;
99
10- import {
11- aliasedSitePath ,
12- Globby ,
13- GlobExcludeDefault ,
14- normalizeUrl ,
15- } from "@docusaurus/utils" ;
10+ import { aliasedSitePath , Globby , normalizeUrl } from "@docusaurus/utils" ;
1611import axios from "axios" ;
1712import chalk from "chalk" ;
1813import fs from "fs-extra" ;
@@ -236,19 +231,11 @@ export async function readOpenapiFiles(
236231 ) ;
237232
238233 // TODO: Add config for inlcude/ignore
239- const allFiles = await Globby ( [ "**/*.{json,yaml,yml}" ] , {
234+ const sources = await Globby ( [ "**/*.{json,yaml,yml}" ] , {
240235 cwd : openapiPath ,
241- ignore : GlobExcludeDefault ,
236+ ignore : [ "**/_category_.{json,yaml,yml}" ] ,
242237 } ) ;
243238
244- // Explicitly look for _spec_ files, which are excluded by default since they start with _
245- allFiles . push (
246- ...( await Globby ( [ "**/_spec_.{json,yaml,yml}" ] , {
247- cwd : openapiPath ,
248- } ) )
249- ) ;
250-
251- const sources = allFiles . filter ( ( x ) => ! x . includes ( "_category_" ) ) ; // todo: regex exclude?
252239 return Promise . all (
253240 sources . map ( async ( source ) => {
254241 // TODO: make a function for this
You can’t perform that action at this time.
0 commit comments