Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !10336

Angular 12 Support: Typescript upgrade + HttpContext

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/AppliedBioMath/master into master 3 years ago
  • Overview 0
  • Commits 5
  • Pipelines 0
  • Changes 109

Created by: andrew-matteson

This PR adds Angular 12 support to the generated client. It upgrades the dependencies in the generated library. It adds context: HttpContext() as an option to the methods of the generated service.

This PR: Fixes #9511 (closed) Fixes #9957 (closed) Fixes #10144 (closed) Fixes #10148 (closed)

I've used this to integrate a generated client in my own product that leverages Angular 12 and HttpContexts.

For users that are on Angular <= 11, this PR will require supplying the ngVersion to the command line. I don't consider this a breaking change, but let me know if this project does.

PR checklist

  • [ x] Read the contribution guidelines.
  • [ x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • [ x] Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    Commit all changed files. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • [x ] File the PR against the correct branch: master (5.3.0), 6.0.x
  • [x ] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @topce (@akehir @petejohansonxo @amakhrov

Compare
  • master (base)

and
  • latest version
    0749e7f7
    5 commits, 2 years ago

109 files
+ 6529
- 1511

    Preferences

    File browser
    Compare changes
bin/c‎onfigs‎
typescript-angular-v12-pro‎vided-in-root-with-npm.yaml‎ +10 -0
typescript-angular-v12‎-provided-in-root.yaml‎ +6 -0
docs/ge‎nerators‎
typescript‎-angular.md‎ +1 -1
modules/openapi-g‎enerator/src/main‎
java/org/openapitoo‎ls/codegen/languages‎
TypeScriptAngular‎ClientCodegen.java‎ +19 -5
resources/type‎script-angular‎
api.servic‎e.mustache‎ +16 -5
samples/cli‎ent/petstore‎
typescript-angular‎-v11-oneOf/…/…/api‎
default.s‎ervice.ts‎ +7 -5
typescri‎pt-axios‎
builds/with‎-npm-version‎
package-‎lock.json‎ +93 -0
tests/‎default‎
package-‎lock.json‎ +0 -1
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
def‎ault‎
.openapi-‎generator‎
FI‎LES‎ +19 -0
VER‎SION‎ +1 -0
a‎pi‎
api‎.ts‎ +7 -0
pet.ser‎vice.ts‎ +647 -0
store.se‎rvice.ts‎ +308 -0
user.se‎rvice.ts‎ +546 -0
mo‎del‎
apiResp‎onse.ts‎ +22 -0
categ‎ory.ts‎ +21 -0
mode‎ls.ts‎ +6 -0
orde‎r.ts‎ +37 -0
pet‎.ts‎ +39 -0
tag‎.ts‎ +21 -0
use‎r.ts‎ +30 -0
.giti‎gnore‎ +4 -0
.openapi-gen‎erator-ignore‎ +23 -0
READ‎ME.md‎ +203 -0
api.mo‎dule.ts‎ +33 -0
configur‎ation.ts‎ +141 -0
encod‎er.ts‎ +20 -0
git_p‎ush.sh‎ +57 -0
inde‎x.ts‎ +5 -0
variab‎les.ts‎ +9 -0
with‎-npm‎
.openapi-‎generator‎
FI‎LES‎ +22 -0
VER‎SION‎ +1 -0
a‎pi‎
api‎.ts‎ +7 -0
pet.ser‎vice.ts‎ +647 -0
store.se‎rvice.ts‎ +308 -0
user.se‎rvice.ts‎ +546 -0
mo‎del‎
apiResp‎onse.ts‎ +22 -0
categ‎ory.ts‎ +21 -0
mode‎ls.ts‎ +6 -0
orde‎r.ts‎ +37 -0
pet‎.ts‎ +39 -0
tag‎.ts‎ +21 -0
use‎r.ts‎ +30 -0
.giti‎gnore‎ +4 -0
.openapi-gen‎erator-ignore‎ +23 -0
READ‎ME.md‎ +203 -0
api.mo‎dule.ts‎ +33 -0
configur‎ation.ts‎ +141 -0
encod‎er.ts‎ +20 -0
git_p‎ush.sh‎ +57 -0
inde‎x.ts‎ +5 -0
ng-pack‎age.json‎ +6 -0
packag‎e.json‎ +34 -0
tsconf‎ig.json‎ +28 -0
variab‎les.ts‎ +9 -0
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
single-request‎-parameter/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-prefixed-‎module-name/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…‎/…‎
defau‎lt/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
with-n‎pm/api‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
…/…‎/…/…‎
pet.ser‎vice.ts‎ +42 -33
store.se‎rvice.ts‎ +22 -17
user.se‎rvice.ts‎ +42 -33
bin/configs/typescript-angular-v12-provided-in-root-with-npm.yaml 0 → 100644
+ 10
- 0
  • View file @ 0749e7f7

  • Edit in single-file editor

  • Open in Web IDE

generatorName: typescript-angular
outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 12.0.0
npmVersion: 1.0.0
npmName: '@openapitools/typescript-angular-petstore'
npmRepository: https://skimdb.npmjs.com/registry
snapshot: false
bin/configs/typescript-angular-v12-provided-in-root.yaml 0 → 100644
+ 6
- 0
  • View file @ 0749e7f7

  • Edit in single-file editor

  • Open in Web IDE

generatorName: typescript-angular
outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 12.0.0
docs/generators/typescript-angular.md
+ 1
- 1
  • View file @ 0749e7f7

  • Edit in single-file editor

  • Open in Web IDE


@@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|modelFileSuffix|The suffix of the file of the generated model (model&lt;suffix&gt;.ts).| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|modelSuffix|The suffix of the generated model.| |null|
|ngVersion|The version of Angular. (At least 6.0.0)| |11.0.0|
|ngVersion|The version of Angular. (At least 6.0.0)| |12.0.0|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java
+ 19
- 5
  • View file @ 0749e7f7

  • Edit in single-file editor

  • Open in Web IDE


@@ -53,6 +53,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
public static final String PROVIDED_IN_ROOT = "providedInRoot";
public static final String PROVIDED_IN = "providedIn";
public static final String ENFORCE_GENERIC_MODULE_WITH_PROVIDERS = "enforceGenericModuleWithProviders";
public static final String HTTP_CONTEXT_IN_OPTIONS = "httpContextInOptions";
public static final String API_MODULE_PREFIX = "apiModulePrefix";
public static final String CONFIGURATION_PREFIX = "configurationPrefix";
public static final String SERVICE_SUFFIX = "serviceSuffix";
@@ -64,7 +65,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values.";
public static final String QUERY_PARAM_OBJECT_FORMAT = "queryParamObjectFormat";
protected String ngVersion = "11.0.0";
protected String ngVersion = "12.0.0";
protected String npmRepository = null;
private boolean useSingleRequestParameter = false;
protected String serviceSuffix = "Service";
@@ -143,7 +144,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
@Override
public String getHelp() {
return "Generates a TypeScript Angular (6.x - 11.x) client library.";
return "Generates a TypeScript Angular (6.x - 12.x) client library.";
}
@Override
@@ -229,6 +230,12 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
additionalProperties.put(ENFORCE_GENERIC_MODULE_WITH_PROVIDERS, false);
}
if (ngVersion.atLeast("12.0.0")) {
additionalProperties.put(HTTP_CONTEXT_IN_OPTIONS, true);
} else {
additionalProperties.put(HTTP_CONTEXT_IN_OPTIONS, false);
}
additionalProperties.put(NG_VERSION, ngVersion);
if (additionalProperties.containsKey(API_MODULE_PREFIX)) {
@@ -285,7 +292,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
}
// Set the typescript version compatible to the Angular version
if (ngVersion.atLeast("11.0.0")) {
if (ngVersion.atLeast("12.0.0")) {
additionalProperties.put("tsVersion", ">=4.2.3 <4.3.0");
} else if (ngVersion.atLeast("11.0.0")) {
additionalProperties.put("tsVersion", ">=4.0.0 <4.1.0");
} else if (ngVersion.atLeast("10.0.0")) {
additionalProperties.put("tsVersion", ">=3.9.2 <4.0.0");
@@ -317,7 +326,10 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json"));
// Specific ng-packagr configuration
if (ngVersion.atLeast("11.0.0")) {
if (ngVersion.atLeast("12.0.0")) {
additionalProperties.put("ngPackagrVersion", "12.2.1");
additionalProperties.put("tsickleVersion", "0.43.0");
} else if (ngVersion.atLeast("11.0.0")) {
additionalProperties.put("ngPackagrVersion", "11.0.2");
additionalProperties.put("tsickleVersion", "0.39.1");
} else if (ngVersion.atLeast("10.0.0")) {
@@ -341,7 +353,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
}
// set zone.js version
if (ngVersion.atLeast("11.0.0")) {
if (ngVersion.atLeast("12.0.0")) {
additionalProperties.put("zonejsVersion", "0.11.4");
} else if (ngVersion.atLeast("11.0.0")) {
additionalProperties.put("zonejsVersion", "0.11.3");
} else if (ngVersion.atLeast("9.0.0")) {
additionalProperties.put("zonejsVersion", "0.10.2");
modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
+ 16
- 5
  • View file @ 0749e7f7

  • Edit in single-file editor

  • Open in Web IDE


@@ -3,7 +3,8 @@
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
HttpResponse, HttpEvent, HttpParameterCodec{{#httpContextInOptions}}, HttpContext {{/httpContextInOptions}}
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
@@ -162,10 +163,10 @@ export class {{classname}} {
* @deprecated
{{/isDeprecated}}
*/
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable<HttpResponse<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable<HttpEvent<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable<any> {
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}},{{#httpContextInOptions}} context?: HttpContext{{/httpContextInOptions}}}): Observable<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}},{{#httpContextInOptions}} context?: HttpContext{{/httpContextInOptions}}}): Observable<HttpResponse<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}},{{#httpContextInOptions}} context?: HttpContext{{/httpContextInOptions}}}): Observable<HttpEvent<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>;
public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{^-last}} | {{/-last}}{{/produces}}{{^produces}}undefined{{/produces}},{{#httpContextInOptions}} context?: HttpContext{{/httpContextInOptions}}}): Observable<any> {
{{#allParams}}
{{#useSingleRequestParameter}}
const {{paramName}} = requestParameters.{{paramName}};
@@ -266,6 +267,13 @@ export class {{classname}} {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
{{#httpContextInOptions}}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
{{/httpContextInOptions}}
{{#bodyParam}}
{{- duplicated below, don't forget to change}}
// to determine the Content-Type header
@@ -348,6 +356,9 @@ export class {{classname}} {
return this.httpClient.{{httpMethod}}{{^isResponseFile}}<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>{{/isResponseFile}}(`${this.configuration.basePath}{{{path}}}`,{{#isBodyAllowed}}
{{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}{{#hasFormParams}}localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams{{/hasFormParams}}{{^hasFormParams}}null{{/hasFormParams}}{{/bodyParam}},{{/isBodyAllowed}}
{
{{#httpContextInOptions}}
context: localVarHttpContext,
{{/httpContextInOptions}}
{{#hasQueryParams}}
params: localVarQueryParameters,
{{/hasQueryParams}}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: OpenAPITools/openapi-generator!10217
Source branch: github/fork/AppliedBioMath/master

Menu

Explore Projects Groups Snippets