forked from loafle/openapi-generator-original
Merge pull request #3855 from wing328/ts_fetch_basepath_fix
[Typescript] fix typescript-fetch base path by removing ending slash
This commit is contained in:
@@ -10,7 +10,7 @@ import * as assign from "core-js/library/fn/object/assign";
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
|
||||
const BASE_PATH = "{{basePath}}";
|
||||
const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, '');
|
||||
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ import * as assign from "core-js/library/fn/object/assign";
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2";
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
|
||||
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
|
||||
@@ -30,7 +30,7 @@ import * as isomorphicFetch from "isomorphic-fetch";
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2";
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
|
||||
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ import * as assign from "core-js/library/fn/object/assign";
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2";
|
||||
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
|
||||
|
||||
export interface FetchArgs {
|
||||
url: string;
|
||||
|
||||
Reference in New Issue
Block a user