From ece66a14c1419e3a68af5a3610c2baf1ef0b304c Mon Sep 17 00:00:00 2001 From: Cristian Achille Date: Sun, 4 Aug 2019 18:05:59 +0200 Subject: [PATCH 1/2] [typescript] change accessToken name parameter to optional --- .../main/resources/typescript-axios/configuration.mustache | 4 ++-- .../src/main/resources/typescript-fetch/runtime.mustache | 2 +- .../src/main/resources/typescript-rxjs/runtime.mustache | 2 +- .../petstore/typescript-axios/builds/default/configuration.ts | 4 ++-- .../typescript-axios/builds/es6-target/configuration.ts | 4 ++-- .../builds/with-complex-headers/configuration.ts | 4 ++-- .../typescript-axios/builds/with-interfaces/configuration.ts | 4 ++-- .../configuration.ts | 4 ++-- .../typescript-axios/builds/with-npm-version/configuration.ts | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache index 98585d783f4f..575a42c020ff 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/configuration.mustache @@ -5,7 +5,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -37,7 +37,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index 6878fd849580..0f80666ff9ae 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -120,7 +120,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache index 429584b64c34..27f466a6650a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache @@ -12,7 +12,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-axios/builds/default/configuration.ts b/samples/client/petstore/typescript-axios/builds/default/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/default/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts b/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts index 65f9da218d66..e53e30f35e37 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/configuration.ts @@ -16,7 +16,7 @@ export interface ConfigurationParameters { apiKey?: string | ((name: string) => string); username?: string; password?: string; - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); basePath?: string; baseOptions?: any; } @@ -48,7 +48,7 @@ export class Configuration { * @param scopes oauth2 scope * @memberof Configuration */ - accessToken?: string | ((name: string, scopes?: string[]) => string); + accessToken?: string | ((name?: string, scopes?: string[]) => string); /** * override base path * From c29fe7d3fcec7c9b62ddeadce8350373295bb629 Mon Sep 17 00:00:00 2001 From: Cristian Achille Date: Mon, 5 Aug 2019 09:44:08 +0200 Subject: [PATCH 2/2] [typescript] update samples for ts-fetch and ts-rxjs --- .../client/petstore/typescript-fetch/builds/default/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/es6-target/runtime.ts | 2 +- .../typescript-fetch/builds/multiple-parameters/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/with-interfaces/runtime.ts | 2 +- .../typescript-fetch/builds/with-npm-version/runtime.ts | 2 +- .../client/petstore/typescript-rxjs/builds/default/runtime.ts | 2 +- .../petstore/typescript-rxjs/builds/es6-target/runtime.ts | 2 +- .../petstore/typescript-rxjs/builds/with-interfaces/runtime.ts | 2 +- .../petstore/typescript-rxjs/builds/with-npm-version/runtime.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index c95a101fbac7..6feeddff5d41 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -131,7 +131,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts index c95a101fbac7..6feeddff5d41 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts @@ -131,7 +131,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index c95a101fbac7..6feeddff5d41 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -131,7 +131,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index c95a101fbac7..6feeddff5d41 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -131,7 +131,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts index c95a101fbac7..6feeddff5d41 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts @@ -131,7 +131,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts index ef017aff8faa..01e3bb106fe4 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts @@ -23,7 +23,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts index ef017aff8faa..01e3bb106fe4 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts @@ -23,7 +23,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts index ef017aff8faa..01e3bb106fe4 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-interfaces/runtime.ts @@ -23,7 +23,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration { diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts index ef017aff8faa..01e3bb106fe4 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts @@ -23,7 +23,7 @@ export interface ConfigurationParameters { username?: string; // parameter for basic security password?: string; // parameter for basic security apiKey?: string | ((name: string) => string); // parameter for apiKey security - accessToken?: string | ((name: string, scopes?: string[]) => string); // parameter for oauth2 security + accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security } export class Configuration {