forked from loafle/openapi-generator-original
fix code styling in ts
This commit is contained in:
parent
b8f9985b8a
commit
15cdbccf08
@ -7,7 +7,7 @@ import * as isomorphicFetch from "isomorphic-fetch";
|
||||
import * as assign from "core-js/library/fn/object/assign";
|
||||
{{/supportsES6}}
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import { Configuration } from "./configuration";
|
||||
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
@ -126,14 +126,14 @@ export const {{classname}}FetchParamCreator = {
|
||||
{{#isKeyInHeader}}
|
||||
if (configuration.apiKey && configuration.apiKey.{{keyParamName}}) {
|
||||
fetchOptions.headers = {{#supportsES6}}Object.{{/supportsES6}}assign({
|
||||
'{{keyParamName}}': configuration.apiKey.{{keyParamName}},
|
||||
"{{keyParamName}}": configuration.apiKey.{{keyParamName}},
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
if (configuration.apiKey && configuration.apiKey.{{keyParamName}}) {
|
||||
urlObj.query = {{#supportsES6}}Object.{{/supportsES6}}assign({}, urlObj.query, {
|
||||
'{{keyParamName}}': configuration.apiKey.{{keyParamName}},
|
||||
"{{keyParamName}}": configuration.apiKey.{{keyParamName}},
|
||||
});
|
||||
}
|
||||
{{/isKeyInQuery}}
|
||||
@ -142,7 +142,7 @@ export const {{classname}}FetchParamCreator = {
|
||||
// http basic authentication required
|
||||
if (configuration.username || configuration.password) {
|
||||
fetchOptions.headers = {{#supportsES6}}Object.{{/supportsES6}}assign({
|
||||
'Authorization': 'Basic ' + btoa(configuration.username + ':' + configuration.password),
|
||||
"Authorization": "Basic " + btoa(configuration.username + ":" + configuration.password),
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
{{/isBasic}}
|
||||
@ -150,7 +150,7 @@ export const {{classname}}FetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = {{#supportsES6}}Object.{{/supportsES6}}assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
{{/isOAuth}}
|
||||
|
@ -16,7 +16,7 @@ import * as url from "url";
|
||||
import * as isomorphicFetch from "isomorphic-fetch";
|
||||
import * as assign from "core-js/library/fn/object/assign";
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import { Configuration } from "./configuration";
|
||||
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
@ -146,7 +146,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ export const PetApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -747,7 +747,7 @@ export const StoreApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ import * as url from "url";
|
||||
|
||||
import * as isomorphicFetch from "isomorphic-fetch";
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import { Configuration } from "./configuration";
|
||||
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
@ -145,7 +145,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ export const PetApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ export const StoreApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = Object.assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import * as url from "url";
|
||||
import * as isomorphicFetch from "isomorphic-fetch";
|
||||
import * as assign from "core-js/library/fn/object/assign";
|
||||
|
||||
import { Configuration } from './configuration';
|
||||
import { Configuration } from "./configuration";
|
||||
|
||||
interface Dictionary<T> { [index: string]: T; }
|
||||
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
|
||||
@ -146,7 +146,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ export const PetApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ export const PetApiFetchParamCreator = {
|
||||
// oauth required
|
||||
if (configuration.accessToken) {
|
||||
fetchOptions.headers = assign({
|
||||
'Authorization': 'Bearer ' + configuration.accessToken,
|
||||
"Authorization": "Bearer " + configuration.accessToken,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
@ -747,7 +747,7 @@ export const StoreApiFetchParamCreator = {
|
||||
// authentication (api_key) required
|
||||
if (configuration.apiKey && configuration.apiKey.api_key) {
|
||||
fetchOptions.headers = assign({
|
||||
'api_key': configuration.apiKey.api_key,
|
||||
"api_key": configuration.apiKey.api_key,
|
||||
}, contentTypeHeader);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user