File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
modules/swagger-codegen/src/main/resources/typescript-fetch
samples/client/petstore/typescript-fetch/builds/default Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as url from "url";
6
6
import * as portableFetch from "portable-fetch";
7
7
import { Configuration } from "./configuration";
8
8
9
- const BASE_PATH = "{ {{basePath} }}".replace(/\/+$/, "");
9
+ let BASE_PATH = "{ {{basePath} }}".replace(/\/+$/, "");
10
10
11
11
/**
12
12
*
@@ -19,6 +19,10 @@ export const COLLECTION_FORMATS = {
19
19
pipes: " |" ,
20
20
} ;
21
21
22
+ export function setBasePath(basePath: string): void {
23
+ BASE_PATH = basePath;
24
+ }
25
+
22
26
/**
23
27
*
24
28
* @export
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import * as url from "url";
17
17
import * as portableFetch from "portable-fetch" ;
18
18
import { Configuration } from "./configuration" ;
19
19
20
- const BASE_PATH = "http://petstore.swagger.io/v2" . replace ( / \/ + $ / , "" ) ;
20
+ let BASE_PATH = "http://petstore.swagger.io/v2" . replace ( / \/ + $ / , "" ) ;
21
21
22
22
/**
23
23
*
@@ -30,6 +30,10 @@ export const COLLECTION_FORMATS = {
30
30
pipes : "|" ,
31
31
} ;
32
32
33
+ export function setBasePath ( basePath : string ) : void {
34
+ BASE_PATH = basePath ;
35
+ }
36
+
33
37
/**
34
38
*
35
39
* @export
You can’t perform that action at this time.
0 commit comments