Skip to content

Commit ec49872

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Post an event v2 API - add a new enum value to links.category field and add pattern validation on changed_resource.name field (#3478)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 44e4b57 commit ec49872

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,12 +3109,14 @@ components:
31093109
- runbook
31103110
- documentation
31113111
- dashboard
3112+
- resource
31123113
example: runbook
31133114
type: string
31143115
x-enum-varnames:
31153116
- RUNBOOK
31163117
- DOCUMENTATION
31173118
- DASHBOARD
3119+
- RESOURCE
31183120
AlertEventCustomAttributesPriority:
31193121
default: '5'
31203122
description: The priority of the alert.
@@ -10383,9 +10385,11 @@ components:
1038310385
properties:
1038410386
name:
1038510387
description: The name of the resource that was changed. Limited to 128 characters.
10388+
Must contain at least one non-whitespace character.
1038610389
example: fallback_payments_test
1038710390
maxLength: 128
1038810391
minLength: 1
10392+
pattern: .*\S.*
1038910393
type: string
1039010394
type:
1039110395
$ref: '#/components/schemas/ChangeEventCustomAttributesChangedResourceType'

services/events/src/v2/models/AlertEventCustomAttributesLinksItemsCategory.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export type AlertEventCustomAttributesLinksItemsCategory =
77
| typeof RUNBOOK
88
| typeof DOCUMENTATION
99
| typeof DASHBOARD
10+
| typeof RESOURCE
1011
| UnparsedObject;
1112
export const RUNBOOK = "runbook";
1213
export const DOCUMENTATION = "documentation";
1314
export const DASHBOARD = "dashboard";
15+
export const RESOURCE = "resource";

services/events/src/v2/models/ChangeEventCustomAttributesChangedResource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ChangeEventCustomAttributesChangedResourceType } from "./ChangeEventCus
77
*/
88
export class ChangeEventCustomAttributesChangedResource {
99
/**
10-
* The name of the resource that was changed. Limited to 128 characters.
10+
* The name of the resource that was changed. Limited to 128 characters. Must contain at least one non-whitespace character.
1111
*/
1212
"name": string;
1313
/**

services/events/src/v2/models/TypingInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export const TypingInfo: ModelTypingInfo = {
5757
"runbook",
5858
"documentation",
5959
"dashboard",
60+
"resource",
6061
],
6162
AlertEventCustomAttributesPriority: ["1", "2", "3", "4", "5"],
6263
AlertEventCustomAttributesStatus: ["warn", "error", "ok"],

0 commit comments

Comments
 (0)