Skip to content

Commit a4b4d43

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8e5ea991 of spec repo (#642)
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 61d1004 commit a4b4d43

File tree

9 files changed

+108
-8
lines changed

9 files changed

+108
-8
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.6.2",
7-
"regenerated": "2022-05-16 16:35:09.192156",
8-
"spec_repo_commit": "e6216ca6"
7+
"regenerated": "2022-05-17 12:13:32.188337",
8+
"spec_repo_commit": "8e5ea991"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-16 16:35:09.208631",
13-
"spec_repo_commit": "e6216ca6"
12+
"regenerated": "2022-05-17 12:13:32.200904",
13+
"spec_repo_commit": "8e5ea991"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,6 +2897,9 @@ components:
28972897
- message
28982898
type: object
28992899
HTTPLogItem:
2900+
additionalProperties:
2901+
description: Additional log attributes.
2902+
type: string
29002903
description: Logs that are sent over HTTP.
29012904
properties:
29022905
ddsource:

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,9 @@ components:
16201620
type: array
16211621
type: object
16221622
HTTPLogItem:
1623+
additionalProperties:
1624+
description: Additional log attributes.
1625+
type: string
16231626
description: Logs that are sent over HTTP.
16241627
properties:
16251628
ddsource:
@@ -1661,7 +1664,7 @@ components:
16611664
example: payment
16621665
type: string
16631666
required:
1664-
- name
1667+
- message
16651668
type: object
16661669
HourlyUsageType:
16671670
description: Usage type that is being measured.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2022-05-12T15:31:57.041Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Logs/Send logs returns \"Request accepted for processing (always 202 empty JSON).\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "0dead10c3be1a77d22a629ee301b5898",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 194,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 512,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "[{\"ddsource\":\"nginx\",\"ddtags\":\"env:staging,version:5.1\",\"hostname\":\"i-012345678\",\"message\":\"2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World\",\"service\":\"payment\",\"status\":\"error\"}]"
36+
},
37+
"queryString": [],
38+
"url": "https://http-intake.logs.datadoghq.com/api/v2/logs"
39+
},
40+
"response": {
41+
"bodySize": 2,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 2,
45+
"text": "{}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 153,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 202,
58+
"statusText": "Accepted"
59+
},
60+
"startedDateTime": "2022-05-12T15:31:57.054Z",
61+
"time": 383
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

examples/v2/logs/SubmitLog.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const params: v2.LogsApiSubmitLogRequest = {
1515
hostname: "i-012345678",
1616
message: "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
1717
service: "payment",
18+
additionalProperties: {
19+
status: "error",
20+
},
1821
},
1922
],
2023
};

features/v2/logs.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ Feature: Logs
135135
When the request is sent
136136
Then the response status is 408 Request Timeout
137137

138-
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-intake
138+
@skip-go @skip-typescript @team:DataDog/logs-backend @team:DataDog/logs-intake
139139
Scenario: Send logs returns "Request accepted for processing (always 202 empty JSON)." response
140140
Given new "SubmitLog" request
141-
And body with value [{"ddsource": "nginx", "ddtags": "env:staging,version:5.1", "hostname": "i-012345678", "message": "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World", "service": "payment"}]
141+
And body with value [{"ddsource": "nginx", "ddtags": "env:staging,version:5.1", "hostname": "i-012345678", "message": "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World", "service": "payment", "status": "error"}]
142142
When the request is sent
143143
Then the response status is 202 Request accepted for processing (always 202 empty JSON).

packages/datadog-api-client-v1/models/HTTPLogItem.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ export class HTTPLogItem {
3737
*/
3838
"service"?: string;
3939

40+
/**
41+
* A container for additional, undeclared properties.
42+
* This is a holder for any undeclared properties as specified with
43+
* the 'additionalProperties' keyword in the OAS document.
44+
*/
45+
"additionalProperties"?: { [key: string]: string };
46+
4047
/**
4148
* @ignore
4249
*/
@@ -67,6 +74,10 @@ export class HTTPLogItem {
6774
baseName: "service",
6875
type: "string",
6976
},
77+
additionalProperties: {
78+
baseName: "additionalProperties",
79+
type: "string",
80+
},
7081
};
7182

7283
/**

packages/datadog-api-client-v2/models/HTTPLogItem.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,21 @@ export class HTTPLogItem {
2929
* of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry.
3030
* That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.
3131
*/
32-
"message"?: string;
32+
"message": string;
3333
/**
3434
* The name of the application or service generating the log events.
3535
* It is used to switch from Logs to APM, so make sure you define the same value when you use both products.
3636
* See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).
3737
*/
3838
"service"?: string;
3939

40+
/**
41+
* A container for additional, undeclared properties.
42+
* This is a holder for any undeclared properties as specified with
43+
* the 'additionalProperties' keyword in the OAS document.
44+
*/
45+
"additionalProperties"?: { [key: string]: string };
46+
4047
/**
4148
* @ignore
4249
*/
@@ -61,11 +68,16 @@ export class HTTPLogItem {
6168
message: {
6269
baseName: "message",
6370
type: "string",
71+
required: true,
6472
},
6573
service: {
6674
baseName: "service",
6775
type: "string",
6876
},
77+
additionalProperties: {
78+
baseName: "additionalProperties",
79+
type: "string",
80+
},
6981
};
7082

7183
/**

0 commit comments

Comments
 (0)