File tree Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,16 @@ export class {{{name}}}{{{@root.postfix}}} {
47
47
* @throws ApiError
48
48
*/
49
49
{{ #if @root.exportClient }}
50
- public {{{ name }}} ({{> parameters }} ): CancelablePromise<{{ >result}}> {
50
+ public {{{ name }}} (
51
+ {{~> parameters ~}} ,
52
+ customHeaders: Record<string , any> = {}
53
+ ): CancelablePromise<{{ >result}}> {
51
54
return this.httpRequest.request({
52
55
{{ else }}
53
- public static {{{ name }}} ({{> parameters }} ): CancelablePromise<{{ >result}}> {
56
+ public static {{{ name }}} (
57
+ {{~> parameters ~}} ,
58
+ customHeaders: Record<string , any> = {}
59
+ ): CancelablePromise<{{ >result}}> {
54
60
return __request(OpenAPI, {
55
61
{{ /if }}
56
62
method: '{{{ method }}} ',
@@ -69,13 +75,7 @@ export class {{{name}}}{{{@root.postfix}}} {
69
75
{{ /each }}
70
76
},
71
77
{{ /if }}
72
- {{ #if parametersHeader }}
73
- headers: {
74
- {{ #each parametersHeader }}
75
- '{{{ prop }}} ': {{{ name }}} ,
76
- {{ /each }}
77
- },
78
- {{ /if }}
78
+ headers: customHeaders,
79
79
{{ #if parametersQuery }}
80
80
query: {
81
81
{{ #each parametersQuery }}
Original file line number Diff line number Diff line change 1
- {{ #if parameters }}
2
- {{ #if parametersPath }}
1
+ {{ ~ #if parameters }}
2
+ {{ ~ #if parametersPath }}
3
3
4
4
{{ #each parametersPath }}
5
5
{{{ name }}}{{> isRequired }} : {{> type }} {{ #if default }} = {{{ default }}} {{ /if }} {{ #unless @last }} ,
6
6
{{ /unless }}
7
7
{{ ~/each }}
8
8
{{ ~/if }}
9
- {{ ~#if parametersPath }}{{ #unless parametersBody }}{{ #unless parametersQuery }}
10
- {{ /unless }}{{ /unless }}{{ /if }}
11
9
{{ ~#if parametersBody }}
12
10
{{ ~#if parametersPath }} ,{{ /if }}
13
11
{{ #with parametersBody }}
14
12
{{{ name }}} : {{> type }}
15
13
{{ ~/with }}
16
- {{ ~#if parametersQuery }} , {{ else }}
17
- {{ /if }}
14
+ {{ ~#if parametersQuery }} ,{{ /if }}
18
15
{{ ~/if }}
19
16
{{ ~#if parametersQuery }}
20
17
{{ ~#if parametersPath }}{{ #unless parametersBody }} ,{{ /unless }}{{ /if }}
21
18
{{ #if codegen.queryParams }}
22
19
queryParams: {{ codegen.queryParams }}
23
- {{ else }}
20
+ {{ ~ else~ }}
24
21
queryParams: {
25
22
{{ #each parametersQuery }}
26
23
{{ #ifdef description deprecated}}
36
33
{{{ name }}}{{> isRequired }} : {{> type }} ,
37
34
{{ /each }}
38
35
}
39
- {{ /if }}
40
- {{ /if }}
41
- {{ /if }}
36
+ {{ ~ /if}}
37
+ {{ ~ /if}}
38
+ {{ ~ /if}}
You can’t perform that action at this time.
0 commit comments