diff --git a/lib/json-schema-static-docs.js b/lib/json-schema-static-docs.js index 2d56dc5..1fb2bcf 100644 --- a/lib/json-schema-static-docs.js +++ b/lib/json-schema-static-docs.js @@ -1,5 +1,6 @@ const extend = require("extend"); const path = require("path"); +const fastGlob = require("fast-glob"); const Loader = require("./loader"); const Resolver = require("./resolver"); const Merger = require("./merger"); @@ -34,10 +35,14 @@ var JsonSchemaStaticDocs = function (options) { }; JsonSchemaStaticDocs.prototype.generate = async function () { + const inputPathPattern = fastGlob.convertPathToPattern( + this._options.inputPath + ); const inputPathGlob = path.join( - this._options.inputPath, + inputPathPattern, this._options.inputFileGlob ); + // clean up path (strip leading ./ etc) const cleanInputPath = path.join(this._options.inputPath); diff --git a/package-lock.json b/package-lock.json index 257b7b9..503f340 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "ajv": "^8.12.0", "ajv-formats": "^2.1.1", "extend": "^3.0.2", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.1", "handlebars": "^4.7.7", "jsonpointer": "^5.0.1", "lodash": ">=4.17.21", diff --git a/package.json b/package.json index d26c702..274ee48 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "ajv": "^8.12.0", "ajv-formats": "^2.1.1", "extend": "^3.0.2", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.1", "handlebars": "^4.7.7", "jsonpointer": "^5.0.1", "lodash": ">=4.17.21",