forked from loafle/openapi-generator-original
Typescript Axios returned types and export paths fixed (#5102)
* Typescript Axiom templates fixed Templates fixed to have `withInterfaces` and `withSeparateModelsAndApi` options working combined. * Added petstore generated samples for typescript-axios * Fixing line endings * Remove unnecessary change in function signature Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com> * re-generate typescript-axios samples Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
This commit is contained in:
committed by
Esteban Gehring
parent
45f26fe0bd
commit
19a5f1248e
@@ -16,6 +16,6 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
||||
{{>apiInner}}
|
||||
{{/apis}}{{/apiInfo}}
|
||||
{{/withSeparateModelsAndApi}}{{#withSeparateModelsAndApi}}
|
||||
{{#apiInfo}}{{#apis}}{{#operations}}export * from './{{apiPackage}}/{{classFilename}}';
|
||||
{{#apiInfo}}{{#apis}}{{#operations}}export * from './{{tsApiPackage}}/{{classFilename}}';
|
||||
{{/operations}}{{/apis}}{{/apiInfo}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
|
||||
@@ -78,7 +78,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
{{#isBasicBasic}}
|
||||
// http basic authentication required
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
localVarRequestOptions["auth"] = { username: configuration.username, password: configuration.password };
|
||||
localVarRequestOptions["auth"] = { username: configuration.username, password: configuration.password };
|
||||
}
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
@@ -256,7 +256,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) {
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
||||
return {{classname}}Fp(configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options)(axios, basePath);
|
||||
},
|
||||
{{/operation}}
|
||||
@@ -284,7 +284,7 @@ export interface {{classname}}Interface {
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}Interface
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}>;
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>;
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user