Skip to content

Commit a3289e2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 519d93a of spec repo (#541)
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 33aa95a commit a3289e2

File tree

4 files changed

+13
-172
lines changed

4 files changed

+13
-172
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-02-18 09:34:45.987117",
8-
"spec_repo_commit": "79cdf99"
7+
"regenerated": "2022-02-22 15:54:37.467191",
8+
"spec_repo_commit": "519d93a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-02-18 09:34:46.007155",
13-
"spec_repo_commit": "79cdf99"
12+
"regenerated": "2022-02-22 15:54:37.488816",
13+
"spec_repo_commit": "519d93a"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,75 +1905,11 @@ components:
19051905
EventCreateResponse:
19061906
description: Object containing an event response.
19071907
properties:
1908-
alert_type:
1909-
$ref: '#/components/schemas/EventAlertType'
1910-
date_happened:
1911-
description: 'POSIX timestamp of the event. Must be sent as an integer (that
1912-
is no quotes).
1913-
1914-
Limited to events no older than 7 days.'
1915-
format: int64
1916-
type: integer
1917-
device_name:
1918-
description: A device name.
1919-
type: string
1920-
host:
1921-
description: 'Host name to associate with the event.
1922-
1923-
Any tags associated with the host are also applied to this event.'
1924-
type: string
1925-
id:
1926-
description: Integer ID of the event.
1927-
format: int64
1928-
readOnly: true
1929-
type: integer
1930-
payload:
1931-
description: Payload of the event.
1932-
example: '{}'
1933-
readOnly: true
1934-
type: string
1935-
priority:
1936-
$ref: '#/components/schemas/EventPriority'
1937-
related_event_id:
1938-
description: ID of the parent event. Must be sent as an integer (that is
1939-
no quotes).
1940-
format: int64
1941-
type: integer
1942-
source_type_name:
1943-
description: 'The type of event being posted. Option examples include nagios,
1944-
hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc.
1945-
1946-
A complete list of source attribute values [available here](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).'
1947-
type: string
1908+
event:
1909+
$ref: '#/components/schemas/Event'
19481910
status:
19491911
description: A status.
19501912
type: string
1951-
tags:
1952-
description: A list of tags to apply to the event.
1953-
example:
1954-
- environment:test
1955-
items:
1956-
description: A tag.
1957-
type: string
1958-
type: array
1959-
text:
1960-
description: 'The body of the event. Limited to 4000 characters. The text
1961-
supports markdown.
1962-
1963-
Use `msg_text` with the Datadog Ruby library.'
1964-
example: Oh boy!
1965-
maxLength: 4000
1966-
type: string
1967-
title:
1968-
description: The event title. Limited to 100 characters. Use `msg_title`
1969-
with the Datadog Ruby library.
1970-
example: Did you hear the news today?
1971-
maxLength: 100
1972-
type: string
1973-
url:
1974-
description: URL of the event.
1975-
readOnly: true
1976-
type: string
19771913
type: object
19781914
EventListResponse:
19791915
description: An event list response.
@@ -1993,6 +1929,7 @@ components:
19931929
- normal
19941930
- low
19951931
example: normal
1932+
nullable: true
19961933
type: string
19971934
x-enum-varnames:
19981935
- NORMAL

features/v1/events.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Feature: Events
4545
And body with value {"title": "{{ unique }}", "text": "A text message.", "tags": ["test:{{ unique_alnum }}"]}
4646
When the request is sent
4747
Then the response status is 202 OK
48+
And the response "event.text" is equal to "A text message."
4849

4950
@team:DataDog/monitors-evaluation
5051
Scenario: Post an event with a long title returns "OK" response

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

Lines changed: 5 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -8,65 +8,19 @@
88
* Do not edit the class manually.
99
*/
1010

11-
import { EventAlertType } from "./EventAlertType";
12-
import { EventPriority } from "./EventPriority";
11+
import { Event } from "./Event";
1312
import { AttributeTypeMap } from "./ObjectSerializer";
1413

1514
/**
1615
* Object containing an event response.
1716
*/
1817

1918
export class EventCreateResponse {
20-
"alertType"?: EventAlertType;
21-
/**
22-
* POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events no older than 7 days.
23-
*/
24-
"dateHappened"?: number;
25-
/**
26-
* A device name.
27-
*/
28-
"deviceName"?: string;
29-
/**
30-
* Host name to associate with the event. Any tags associated with the host are also applied to this event.
31-
*/
32-
"host"?: string;
33-
/**
34-
* Integer ID of the event.
35-
*/
36-
"id"?: number;
37-
/**
38-
* Payload of the event.
39-
*/
40-
"payload"?: string;
41-
"priority"?: EventPriority;
42-
/**
43-
* ID of the parent event. Must be sent as an integer (that is no quotes).
44-
*/
45-
"relatedEventId"?: number;
46-
/**
47-
* The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. A complete list of source attribute values [available here](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
48-
*/
49-
"sourceTypeName"?: string;
19+
"event"?: Event;
5020
/**
5121
* A status.
5222
*/
5323
"status"?: string;
54-
/**
55-
* A list of tags to apply to the event.
56-
*/
57-
"tags"?: Array<string>;
58-
/**
59-
* The body of the event. Limited to 4000 characters. The text supports markdown. Use `msg_text` with the Datadog Ruby library.
60-
*/
61-
"text"?: string;
62-
/**
63-
* The event title. Limited to 100 characters. Use `msg_title` with the Datadog Ruby library.
64-
*/
65-
"title"?: string;
66-
/**
67-
* URL of the event.
68-
*/
69-
"url"?: string;
7024

7125
/**
7226
* @ignore
@@ -77,65 +31,14 @@ export class EventCreateResponse {
7731
* @ignore
7832
*/
7933
static readonly attributeTypeMap: AttributeTypeMap = {
80-
alertType: {
81-
baseName: "alert_type",
82-
type: "EventAlertType",
83-
},
84-
dateHappened: {
85-
baseName: "date_happened",
86-
type: "number",
87-
format: "int64",
88-
},
89-
deviceName: {
90-
baseName: "device_name",
91-
type: "string",
92-
},
93-
host: {
94-
baseName: "host",
95-
type: "string",
96-
},
97-
id: {
98-
baseName: "id",
99-
type: "number",
100-
format: "int64",
101-
},
102-
payload: {
103-
baseName: "payload",
104-
type: "string",
105-
},
106-
priority: {
107-
baseName: "priority",
108-
type: "EventPriority",
109-
},
110-
relatedEventId: {
111-
baseName: "related_event_id",
112-
type: "number",
113-
format: "int64",
114-
},
115-
sourceTypeName: {
116-
baseName: "source_type_name",
117-
type: "string",
34+
event: {
35+
baseName: "event",
36+
type: "Event",
11837
},
11938
status: {
12039
baseName: "status",
12140
type: "string",
12241
},
123-
tags: {
124-
baseName: "tags",
125-
type: "Array<string>",
126-
},
127-
text: {
128-
baseName: "text",
129-
type: "string",
130-
},
131-
title: {
132-
baseName: "title",
133-
type: "string",
134-
},
135-
url: {
136-
baseName: "url",
137-
type: "string",
138-
},
13942
};
14043

14144
/**

0 commit comments

Comments
 (0)