Skip to content

Commit 9e2f33b

Browse files
committed
Allow basePath to be overridden by Configuration
1 parent ba30679 commit 9e2f33b

File tree

1 file changed

+2
-1
lines changed
  • modules/swagger-codegen/src/main/resources/Javascript-Flowtyped

1 file changed

+2
-1
lines changed

modules/swagger-codegen/src/main/resources/Javascript-Flowtyped/api.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ export type {{classname}}Type = { {{#operation}}
240240
* {{{description}}}{{/description}}
241241
* @export
242242
*/
243-
export const {{classname}} = function(configuration?: Configuration, fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH): {{classname}}Type {
243+
export const {{classname}} = function(configuration?: Configuration, fetch: FetchAPI = portableFetch): {{classname}}Type {
244+
const basePath: string = (configuration && configuration.basePath) || BASE_PATH;
244245
return {
245246
{{#operation}}
246247
/**

0 commit comments

Comments
 (0)