diff --git a/apps/generator/docs/api.md b/apps/generator/docs/api.md index 42d7309e5..3dd56e79e 100644 --- a/apps/generator/docs/api.md +++ b/apps/generator/docs/api.md @@ -39,9 +39,9 @@ Reference API documentation for AsyncAPI Generator library. * [.executeAfterHook()](#Generator+executeAfterHook) ⇒ `Promise.` * [.parseInput()](#Generator+parseInput) * [.configureTemplate()](#Generator+configureTemplate) - * ~~[.generateFromString(asyncapiString, [parseOptions])](#Generator+generateFromString) ⇒ `Promise`~~ - * [.generateFromURL(asyncapiURL)](#Generator+generateFromURL) ⇒ `Promise` - * [.generateFromFile(asyncapiFile)](#Generator+generateFromFile) ⇒ `Promise` + * ~~[.generateFromString(asyncapiString, [parseOptions])](#Generator+generateFromString) ⇒ `Promise.<(TemplateRenderResult|undefined)>`~~ + * [.generateFromURL(asyncapiURL)](#Generator+generateFromURL) ⇒ `Promise.<(TemplateRenderResult|undefined)>` + * [.generateFromFile(asyncapiFile)](#Generator+generateFromFile) ⇒ `Promise.<(TemplateRenderResult|undefined)>` * [.installTemplate([force])](#Generator+installTemplate) * _static_ * [.getTemplateFile(templateName, filePath, [templatesDir])](#Generator.getTemplateFile) ⇒ `Promise` diff --git a/apps/generator/lib/generator.js b/apps/generator/lib/generator.js index 077634e1c..2414cc6a7 100644 --- a/apps/generator/lib/generator.js +++ b/apps/generator/lib/generator.js @@ -436,7 +436,7 @@ class Generator { * @param {String} asyncapiString AsyncAPI string to use as source. * @param {Object} [parseOptions={}] AsyncAPI Parser parse options. Check out {@link https://www.github.com/asyncapi/parser-js|@asyncapi/parser} for more information. * @deprecated Use the `generate` function instead. Just change the function name and it works out of the box. - * @return {Promise} + * @return {Promise} */ async generateFromString(asyncapiString, parseOptions = {}) { const isParsableCompatible = asyncapiString && typeof asyncapiString === 'string'; @@ -466,7 +466,7 @@ class Generator { * } * * @param {String} asyncapiURL Link to AsyncAPI file - * @return {Promise} + * @return {Promise} */ async generateFromURL(asyncapiURL) { const doc = await fetchSpec(asyncapiURL); @@ -493,7 +493,7 @@ class Generator { * } * * @param {String} asyncapiFile AsyncAPI file to use as source. - * @return {Promise} + * @return {Promise} */ async generateFromFile(asyncapiFile) { const doc = await readFile(asyncapiFile, { encoding: 'utf8' });