generators/javascript


id: generator-opts-client-javascript title: Config Options for javascriptsidebar_label: javascript


OptionDescriptionValuesDefault
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
ensureUniqueParamsWhether to ensure parameter names are unique in an operation (rename parameters that are not).true
allowUnicodeIdentifiersboolean, toggles whether unicode identifiers are allowed in names or not, default is falsefalse
prependFormOrBodyParametersAdd form or body parameters to the beginning of the parameter list.false
sourceFoldersource folder for generated codesrc
invokerPackageroot package for generated codenull
apiPackagepackage for generated api classesnull
modelPackagepackage for generated modelsnull
projectNamename of the project (Default: generated from info.title or "openapi-js-client")null
moduleNamemodule name for AMD, Node or globals (Default: generated from <projectName>)null
projectDescriptiondescription of the project (Default: using info.description or "Client library of <projectName>")null
projectVersionversion of the project (Default: using info.version or "1.0.0")null
licenseNamename of the license the project uses (Default: using info.license.name)null
usePromisesuse Promises as return values from the client API, instead of superagent callbacksfalse
emitModelMethodsgenerate getters and setters for model propertiesfalse
emitJSDocgenerate JSDoc commentstrue
useInheritanceuse JavaScript prototype chains & delegation for inheritancetrue
hideGenerationTimestampHides the generation timestamp when files are generated.true
useES6use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.true
modelPropertyNamingNaming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original namecamelCase