diff --git a/src/main/resources/handlebars/javascript/es6/ApiClient.mustache b/src/main/resources/handlebars/javascript/es6/ApiClient.mustache index 377df30268..61b40aaf82 100644 --- a/src/main/resources/handlebars/javascript/es6/ApiClient.mustache +++ b/src/main/resources/handlebars/javascript/es6/ApiClient.mustache @@ -13,7 +13,7 @@ import superagent from "superagent"; * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient * @class */{{/emitJSDoc}} -export class ApiClient { +export default class ApiClient { constructor() { {{#emitJSDoc}}/** * The base URL against which to resolve every API call's (relative) path. diff --git a/src/main/resources/handlebars/javascript/es6/api.mustache b/src/main/resources/handlebars/javascript/es6/api.mustache index de9aa58a49..f5fe9d6e5d 100644 --- a/src/main/resources/handlebars/javascript/es6/api.mustache +++ b/src/main/resources/handlebars/javascript/es6/api.mustache @@ -1,6 +1,6 @@ {{>licenseInfo}} -import {{braces "left"}}ApiClient{{braces "right"}} from "../ApiClient"; -{{#imports}}import {{braces "left"}}{{import}}{{braces "right"}} from '../{{#modelPackage}}{{&modelPackage}}/{{/modelPackage}}{{import}}'; +import ApiClient from "../ApiClient"; +{{#imports}}import {{import}} from '../{{#modelPackage}}{{&modelPackage}}/{{/modelPackage}}{{import}}'; {{/imports}} {{#emitJSDoc}}/** @@ -8,7 +8,7 @@ import {{braces "left"}}ApiClient{{braces "right"}} from "../ApiClient"; * @module {{#invokerPackage}}{{&invokerPackage}}/{{/invokerPackage}}{{#apiPackage}}{{&apiPackage}}/{{/apiPackage}}{{classname}} * @version {{projectVersion}} */{{/emitJSDoc}} -export class {{classname}} { +export default class {{classname}} { {{#emitJSDoc}}/** * Constructs a new {{&classname}}. {{#description}} diff --git a/src/main/resources/handlebars/javascript/es6/enumClass.mustache b/src/main/resources/handlebars/javascript/es6/enumClass.mustache index 2c245b2df8..fe9402608d 100644 --- a/src/main/resources/handlebars/javascript/es6/enumClass.mustache +++ b/src/main/resources/handlebars/javascript/es6/enumClass.mustache @@ -3,7 +3,7 @@ * @enum {{braces "left"}}{{datatype}}{{braces "right"}} * @readonly */{{/emitJSDoc}} - export {{datatypeWithEnum}} = { + export default {{datatypeWithEnum}} = { {{#allowableValues}} {{#enumVars}} {{#emitJSDoc}} diff --git a/src/main/resources/handlebars/javascript/es6/index.mustache b/src/main/resources/handlebars/javascript/es6/index.mustache index 592aff8794..a2a9e49e51 100644 --- a/src/main/resources/handlebars/javascript/es6/index.mustache +++ b/src/main/resources/handlebars/javascript/es6/index.mustache @@ -1,7 +1,7 @@ {{>licenseInfo}} -import {ApiClient} from './ApiClient'; -{{#models}}import {{braces "left"}}{{#model}}{{classFilename}}{{/model}}{{braces "right"}} from './{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'; -{{/models}}{{#apiInfo}}{{#apis}}import {{braces "left"}}{{importPath}}{{braces "right"}} from './{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'; +import ApiClient from './ApiClient'; +{{#models}}import {{#model}}{{classFilename}}{{/model}} from './{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'; +{{/models}}{{#apiInfo}}{{#apis}}import {{importPath}} from './{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'; {{/apis}}{{/apiInfo}} {{#emitJSDoc}}/**{{#projectDescription}} diff --git a/src/main/resources/handlebars/javascript/es6/model.mustache b/src/main/resources/handlebars/javascript/es6/model.mustache index d77ed4c3ba..204bb5be1c 100644 --- a/src/main/resources/handlebars/javascript/es6/model.mustache +++ b/src/main/resources/handlebars/javascript/es6/model.mustache @@ -1,7 +1,7 @@ {{>licenseInfo}} -import {{braces "left"}}ApiClient{{braces "right"}} from '../ApiClient'; +import ApiClient from '../ApiClient'; {{#imports}} -import {{braces "left"}}{{import}}{{braces "right"}} from './{{import}}'; +import {{import}} from './{{import}}'; {{/imports}} {{#models}} diff --git a/src/main/resources/handlebars/javascript/es6/partial_model_enum_class.mustache b/src/main/resources/handlebars/javascript/es6/partial_model_enum_class.mustache index 6c312fbe6e..98fa3186f7 100644 --- a/src/main/resources/handlebars/javascript/es6/partial_model_enum_class.mustache +++ b/src/main/resources/handlebars/javascript/es6/partial_model_enum_class.mustache @@ -30,4 +30,4 @@ const {{classname}} = { } }; -export {{braces "left"}}{{classname}}{{braces "right"}}; \ No newline at end of file +export default {{braces "left"}}{{classname}}{{braces "right"}}; \ No newline at end of file diff --git a/src/main/resources/handlebars/javascript/es6/partial_model_generic.mustache b/src/main/resources/handlebars/javascript/es6/partial_model_generic.mustache index 2f92ea8677..8c854ae4aa 100644 --- a/src/main/resources/handlebars/javascript/es6/partial_model_generic.mustache +++ b/src/main/resources/handlebars/javascript/es6/partial_model_generic.mustache @@ -5,7 +5,7 @@ * @version {{projectVersion}} */ {{/emitJSDoc}} -export class {{classname}} {{#parentModel}}extends {{classname}} {{/parentModel}}{{#parent}}{{^parentModel}}{{#vendorExtensions.x-isArray}}extends Array {{/vendorExtensions.x-isArray}}{{/parentModel}}{{/parent}}{ +export default class {{classname}} {{#parentModel}}extends {{classname}} {{/parentModel}}{{#parent}}{{^parentModel}}{{#vendorExtensions.x-isArray}}extends Array {{/vendorExtensions.x-isArray}}{{/parentModel}}{{/parent}}{ {{#emitJSDoc}} /** * Constructs a new {{classname}}.{{#description}}