Skip to content

Commit b09ce3f

Browse files
api-clients-generation-pipeline[bot]jirikuncarci.datadog-api-spec
authored
Match Accept and Content-Type headers in cassettes (#459)
* Match headers * Regenerate client from commit 0468fdc of spec repo Co-authored-by: Jiri Kuncar <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 47886a7 commit b09ce3f

File tree

461 files changed

+4737
-4784
lines changed

Some content is hidden

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

461 files changed

+4737
-4784
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-10 18:21:11.009424",
8-
"spec_repo_commit": "16aa0e9"
7+
"regenerated": "2022-01-11 14:01:20.740441",
8+
"spec_repo_commit": "0468fdc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-10 18:21:11.034033",
13-
"spec_repo_commit": "16aa0e9"
12+
"regenerated": "2022-01-11 14:01:20.772245",
13+
"spec_repo_commit": "0468fdc"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,13 +825,15 @@ components:
825825
description: The API key.
826826
readOnly: true
827827
type: string
828+
x-secret: true
828829
last4:
829830
description: The last four characters of the API key.
830831
example: abcd
831832
maxLength: 4
832833
minLength: 4
833834
readOnly: true
834835
type: string
836+
x-secret: true
835837
modified_at:
836838
description: Date the API key was last modified.
837839
example: '2020-11-23T10:00:00.000Z'
@@ -867,13 +869,15 @@ components:
867869
description: The application key.
868870
readOnly: true
869871
type: string
872+
x-secret: true
870873
last4:
871874
description: The last four characters of the application key.
872875
example: abcd
873876
maxLength: 4
874877
minLength: 4
875878
readOnly: true
876879
type: string
880+
x-secret: true
877881
name:
878882
description: Name of the application key.
879883
example: Application Key for managing dashboards
@@ -3534,6 +3538,7 @@ components:
35343538
minLength: 4
35353539
readOnly: true
35363540
type: string
3541+
x-secret: true
35373542
modified_at:
35383543
description: Date the API key was last modified.
35393544
example: '2020-11-23T10:00:00.000Z'
@@ -3572,6 +3577,7 @@ components:
35723577
minLength: 4
35733578
readOnly: true
35743579
type: string
3580+
x-secret: true
35753581
name:
35763582
description: Name of the application key.
35773583
example: Application Key for managing dashboards

.generator/templates/api/api.mustache

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
6666

6767
// Make Request Context
6868
const requestContext = getServer(_config, '{{classname}}.{{nickname}}').makeRequestContext(localVarPath, HttpMethod.{{httpMethod}});
69-
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
69+
{{#hasProduces}}
70+
{{#produces}}
71+
{{#-first}}requestContext.setHeaderParam("Accept", "{{{mediaType}}}");{{/-first}}
72+
{{/produces}}
73+
{{/hasProduces}}
74+
{{^hasProduces}}
75+
requestContext.setHeaderParam("Accept", "application/json");
76+
{{/hasProduces}}
7077
requestContext.setHttpConfig(_config.httpConfig);
7178
{{#queryParams}}
7279
{{#-first}}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2021-10-01T08:28:30.257Z"
1+
"2022-01-06T00:50:20.672Z"

cassettes/v1/Authentication_4165494657/Validate-API-key-returns-Forbidden-response_4013068159/recording.har

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "f5babbb78831da3e8137c22a7b7a4585",
11+
"_id": "3f83caeac40597dfc554ee2d9f9e4f01",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -18,10 +18,10 @@
1818
{
1919
"_fromType": "array",
2020
"name": "accept",
21-
"value": "application/json, */*;q=0.8"
21+
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 311,
24+
"headersSize": 304,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [],
@@ -32,7 +32,7 @@
3232
"content": {
3333
"mimeType": "application/json",
3434
"size": 32,
35-
"text": "{\"errors\": [\"API key required\"]}"
35+
"text": "{\"errors\":[\"API key required\"]}"
3636
},
3737
"cookies": [],
3838
"headers": [
@@ -47,8 +47,8 @@
4747
"status": 403,
4848
"statusText": "Forbidden"
4949
},
50-
"startedDateTime": "2021-10-01T08:28:30.274Z",
51-
"time": 49
50+
"startedDateTime": "2022-01-06T00:50:20.692Z",
51+
"time": 208
5252
}
5353
],
5454
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2021-10-01T08:28:30.346Z"
1+
"2022-01-06T00:50:20.920Z"

cassettes/v1/Authentication_4165494657/Validate-API-key-returns-OK-response_1399847646/recording.har

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "f5babbb78831da3e8137c22a7b7a4585",
11+
"_id": "3f83caeac40597dfc554ee2d9f9e4f01",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -18,10 +18,10 @@
1818
{
1919
"_fromType": "array",
2020
"name": "accept",
21-
"value": "application/json, */*;q=0.8"
21+
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 359,
24+
"headersSize": 351,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [],
@@ -47,8 +47,8 @@
4747
"status": 200,
4848
"statusText": "OK"
4949
},
50-
"startedDateTime": "2021-10-01T08:28:30.350Z",
51-
"time": 39
50+
"startedDateTime": "2022-01-06T00:50:20.925Z",
51+
"time": 204
5252
}
5353
],
5454
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2021-10-01T08:28:30.491Z"
1+
"2022-01-06T00:50:21.238Z"

cassettes/v1/Dashboard-Lists_746246042/Create-a-dashboard-list-returns-OK-response_3696782240/recording.har

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "3d8ee07d9a202b138fe364c6273ded9f",
11+
"_id": "4e860eb7fadde810ec47b131c981b4d0",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -18,21 +18,21 @@
1818
{
1919
"_fromType": "array",
2020
"name": "accept",
21-
"value": "application/json, */*;q=0.8"
21+
"value": "application/json"
2222
},
2323
{
2424
"_fromType": "array",
2525
"name": "content-type",
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 488,
29+
"headersSize": 489,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"name\":\"Test-Create_a_dashboard_list_returns_OK_response-1633076910\"}"
35+
"text": "{\"name\":\"Test-Create_a_dashboard_list_returns_OK_response-1641430221\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/dashboard/lists/manual"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 315,
45-
"text": "{\"is_favorite\":false,\"name\":\"Test-Create_a_dashboard_list_returns_OK_response-1633076910\",\"dashboard_count\":0,\"author\":{\"handle\":\"[email protected]\",\"name\":null},\"created\":\"2021-10-01T08:28:30.564949+00:00\",\"type\":\"manual_dashboard_list\",\"dashboards\":null,\"modified\":\"2021-10-01T08:28:30.564987+00:00\",\"id\":240514}"
45+
"text": "{\"is_favorite\":false,\"name\":\"Test-Create_a_dashboard_list_returns_OK_response-1641430221\",\"dashboard_count\":0,\"author\":{\"handle\":\"[email protected]\",\"name\":null},\"created\":\"2022-01-06T00:50:21.382205+00:00\",\"type\":\"manual_dashboard_list\",\"dashboards\":null,\"modified\":\"2022-01-06T00:50:21.382231+00:00\",\"id\":269879}"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2021-10-01T08:28:30.496Z",
61-
"time": 109
60+
"startedDateTime": "2022-01-06T00:50:21.244Z",
61+
"time": 189
6262
},
6363
{
64-
"_id": "202c781526cdaeb0684ec5de50b81fbf",
64+
"_id": "927581f6e2272b8eb79d1ec03b8c0834",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -71,21 +71,21 @@
7171
{
7272
"_fromType": "array",
7373
"name": "accept",
74-
"value": "application/json, */*;q=0.8"
74+
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 444,
77+
"headersSize": 446,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/dashboard/lists/manual/240514"
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/lists/manual/269879"
8282
},
8383
"response": {
8484
"bodySize": 36,
8585
"content": {
8686
"mimeType": "application/json",
8787
"size": 36,
88-
"text": "{\"deleted_dashboard_list_id\":240514}"
88+
"text": "{\"deleted_dashboard_list_id\":269879}"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -100,8 +100,8 @@
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2021-10-01T08:28:30.614Z",
104-
"time": 116
103+
"startedDateTime": "2022-01-06T00:50:21.438Z",
104+
"time": 244
105105
}
106106
],
107107
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2021-10-01T08:28:30.738Z"
1+
"2022-01-06T00:50:21.689Z"

0 commit comments

Comments
 (0)