Skip to content

Commit fc1a277

Browse files
api-clients-generation-pipeline[bot]therveci.datadog-api-spec
authored
Small typescript cleanup (#461)
* Cleanup some empty lines * Regenerate client from commit 9ed9d34 of spec repo Co-authored-by: Thomas Hervé <[email protected]> Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 71a9ae1 commit fc1a277

File tree

220 files changed

+15
-2672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+15
-2672
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2022-01-05 10:21:37.035741",
8-
"spec_repo_commit": "e880fa4"
7+
"regenerated": "2022-01-07 16:14:55.478126",
8+
"spec_repo_commit": "9ed9d34"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-05 10:21:37.061134",
13-
"spec_repo_commit": "e880fa4"
12+
"regenerated": "2022-01-07 16:14:55.502362",
13+
"spec_repo_commit": "9ed9d34"
1414
}
1515
}
1616
}

.generator/templates/api/api.mustache

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,27 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
6868
const requestContext = getServer(_config, '{{classname}}.{{nickname}}').makeRequestContext(localVarPath, HttpMethod.{{httpMethod}});
6969
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
7070
requestContext.setHttpConfig(_config.httpConfig);
71+
{{#queryParams}}
72+
{{#-first}}
7173

7274
// Query Params
73-
{{#queryParams}}
75+
{{/-first}}
7476
if ({{paramName}} !== undefined) {
7577
requestContext.setQueryParam("{{baseName}}", ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}"));
7678
}
7779
{{/queryParams}}
80+
{{#headerParams}}
81+
{{#-first}}
7882

7983
// Header Params
80-
{{#headerParams}}
84+
{{/-first}}
8185
if ({{paramName}} !== undefined) {
8286
requestContext.setHeaderParam("{{baseName}}", ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}"));
8387
}
8488
{{/headerParams}}
89+
{{#hasFormParams}}
8590

8691
// Form Params
87-
{{#hasFormParams}}
8892
let localVarFormParams = new FormData();
8993
{{/hasFormParams}}
9094

@@ -124,9 +128,9 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
124128
{{#hasFormParams}}
125129
requestContext.setBody(localVarFormParams);
126130
{{/hasFormParams}}
131+
{{#bodyParam}}
127132

128133
// Body Params
129-
{{#bodyParam}}
130134
const contentType = ObjectSerializer.getPreferredMediaType([{{#consumes}}
131135
"{{{mediaType}}}"{{^-last}},{{/-last}}
132136
{{/consumes}}]);

.generator/templates/model/model.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
3030
{{#vars}}
3131
"{{name}}": {
3232
"baseName": "{{baseName}}",
33-
"type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}",
34-
{{#required}}"required": {{required}},{{/required}}
35-
{{#dataFormat}}"format": "{{.}}",{{/dataFormat}}
33+
"type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}",{{#required}}
34+
"required": {{required}},{{/required}}{{#dataFormat}}
35+
"format": "{{.}}",{{/dataFormat}}
3636
}{{^-last}},
3737
{{/-last}}
3838
{{/vars}}

packages/datadog-api-client-v1/apis/AWSIntegrationApi.ts

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
4848
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
4949
requestContext.setHttpConfig(_config.httpConfig);
5050

51-
// Query Params
52-
53-
// Header Params
54-
55-
// Form Params
56-
5751
// Body Params
5852
const contentType = ObjectSerializer.getPreferredMediaType([
5953
"application/json",
@@ -109,12 +103,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
109103
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
110104
requestContext.setHttpConfig(_config.httpConfig);
111105

112-
// Query Params
113-
114-
// Header Params
115-
116-
// Form Params
117-
118106
// Body Params
119107
const contentType = ObjectSerializer.getPreferredMediaType([
120108
"application/json",
@@ -170,12 +158,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
170158
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
171159
requestContext.setHttpConfig(_config.httpConfig);
172160

173-
// Query Params
174-
175-
// Header Params
176-
177-
// Form Params
178-
179161
// Body Params
180162
const contentType = ObjectSerializer.getPreferredMediaType([
181163
"application/json",
@@ -231,12 +213,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
231213
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
232214
requestContext.setHttpConfig(_config.httpConfig);
233215

234-
// Query Params
235-
236-
// Header Params
237-
238-
// Form Params
239-
240216
// Body Params
241217
const contentType = ObjectSerializer.getPreferredMediaType([
242218
"application/json",
@@ -292,12 +268,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
292268
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
293269
requestContext.setHttpConfig(_config.httpConfig);
294270

295-
// Query Params
296-
297-
// Header Params
298-
299-
// Form Params
300-
301271
// Body Params
302272
const contentType = ObjectSerializer.getPreferredMediaType([
303273
"application/json",
@@ -370,12 +340,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
370340
);
371341
}
372342

373-
// Header Params
374-
375-
// Form Params
376-
377-
// Body Params
378-
379343
let authMethod = null;
380344
// Apply auth methods
381345
authMethod = _config.authMethods["apiKeyAuth"];
@@ -428,12 +392,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
428392
);
429393
}
430394

431-
// Header Params
432-
433-
// Form Params
434-
435-
// Body Params
436-
437395
let authMethod = null;
438396
// Apply auth methods
439397
authMethod = _config.authMethods["apiKeyAuth"];
@@ -469,14 +427,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
469427
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
470428
requestContext.setHttpConfig(_config.httpConfig);
471429

472-
// Query Params
473-
474-
// Header Params
475-
476-
// Form Params
477-
478-
// Body Params
479-
480430
let authMethod = null;
481431
// Apply auth methods
482432
authMethod = _config.authMethods["apiKeyAuth"];
@@ -547,10 +497,6 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
547497
);
548498
}
549499

550-
// Header Params
551-
552-
// Form Params
553-
554500
// Body Params
555501
const contentType = ObjectSerializer.getPreferredMediaType([
556502
"application/json",

packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
4646
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
4747
requestContext.setHttpConfig(_config.httpConfig);
4848

49-
// Query Params
50-
51-
// Header Params
52-
53-
// Form Params
54-
5549
// Body Params
5650
const contentType = ObjectSerializer.getPreferredMediaType([
5751
"application/json",
@@ -112,12 +106,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
112106
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
113107
requestContext.setHttpConfig(_config.httpConfig);
114108

115-
// Query Params
116-
117-
// Header Params
118-
119-
// Form Params
120-
121109
// Body Params
122110
const contentType = ObjectSerializer.getPreferredMediaType([
123111
"application/json",
@@ -173,12 +161,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
173161
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
174162
requestContext.setHttpConfig(_config.httpConfig);
175163

176-
// Query Params
177-
178-
// Header Params
179-
180-
// Form Params
181-
182164
// Body Params
183165
const contentType = ObjectSerializer.getPreferredMediaType([
184166
"application/json",
@@ -234,12 +216,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
234216
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
235217
requestContext.setHttpConfig(_config.httpConfig);
236218

237-
// Query Params
238-
239-
// Header Params
240-
241-
// Form Params
242-
243219
// Body Params
244220
const contentType = ObjectSerializer.getPreferredMediaType([
245221
"application/json",
@@ -295,12 +271,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
295271
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
296272
requestContext.setHttpConfig(_config.httpConfig);
297273

298-
// Query Params
299-
300-
// Header Params
301-
302-
// Form Params
303-
304274
// Body Params
305275
const contentType = ObjectSerializer.getPreferredMediaType([
306276
"application/json",
@@ -347,14 +317,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
347317
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
348318
requestContext.setHttpConfig(_config.httpConfig);
349319

350-
// Query Params
351-
352-
// Header Params
353-
354-
// Form Params
355-
356-
// Body Params
357-
358320
let authMethod = null;
359321
// Apply auth methods
360322
authMethod = _config.authMethods["apiKeyAuth"];
@@ -390,14 +352,6 @@ export class AWSLogsIntegrationApiRequestFactory extends BaseAPIRequestFactory {
390352
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
391353
requestContext.setHttpConfig(_config.httpConfig);
392354

393-
// Query Params
394-
395-
// Header Params
396-
397-
// Form Params
398-
399-
// Body Params
400-
401355
let authMethod = null;
402356
// Apply auth methods
403357
authMethod = _config.authMethods["apiKeyAuth"];

packages/datadog-api-client-v1/apis/AuthenticationApi.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
3131
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
3232
requestContext.setHttpConfig(_config.httpConfig);
3333

34-
// Query Params
35-
36-
// Header Params
37-
38-
// Form Params
39-
40-
// Body Params
41-
4234
let authMethod = null;
4335
// Apply auth methods
4436
authMethod = _config.authMethods["AuthZ"];

packages/datadog-api-client-v1/apis/AzureIntegrationApi.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
4242
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
4343
requestContext.setHttpConfig(_config.httpConfig);
4444

45-
// Query Params
46-
47-
// Header Params
48-
49-
// Form Params
50-
5145
// Body Params
5246
const contentType = ObjectSerializer.getPreferredMediaType([
5347
"application/json",
@@ -103,12 +97,6 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
10397
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
10498
requestContext.setHttpConfig(_config.httpConfig);
10599

106-
// Query Params
107-
108-
// Header Params
109-
110-
// Form Params
111-
112100
// Body Params
113101
const contentType = ObjectSerializer.getPreferredMediaType([
114102
"application/json",
@@ -155,14 +143,6 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
155143
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
156144
requestContext.setHttpConfig(_config.httpConfig);
157145

158-
// Query Params
159-
160-
// Header Params
161-
162-
// Form Params
163-
164-
// Body Params
165-
166146
let authMethod = null;
167147
// Apply auth methods
168148
authMethod = _config.authMethods["apiKeyAuth"];
@@ -207,12 +187,6 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
207187
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
208188
requestContext.setHttpConfig(_config.httpConfig);
209189

210-
// Query Params
211-
212-
// Header Params
213-
214-
// Form Params
215-
216190
// Body Params
217191
const contentType = ObjectSerializer.getPreferredMediaType([
218192
"application/json",
@@ -268,12 +242,6 @@ export class AzureIntegrationApiRequestFactory extends BaseAPIRequestFactory {
268242
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
269243
requestContext.setHttpConfig(_config.httpConfig);
270244

271-
// Query Params
272-
273-
// Header Params
274-
275-
// Form Params
276-
277245
// Body Params
278246
const contentType = ObjectSerializer.getPreferredMediaType([
279247
"application/json",

0 commit comments

Comments
 (0)