Skip to content

Commit 50f6a6d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support for Entity kind API (#2031)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e9ed1aa commit 50f6a6d

12 files changed

+486
-4
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.6",
7-
"regenerated": "2025-01-31 15:03:07.790966",
8-
"spec_repo_commit": "b01f90f4"
7+
"regenerated": "2025-02-03 15:47:58.970655",
8+
"spec_repo_commit": "d6014add"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-31 15:03:07.806862",
13-
"spec_repo_commit": "b01f90f4"
12+
"regenerated": "2025-02-03 15:47:58.986107",
13+
"spec_repo_commit": "d6014add"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10524,6 +10524,99 @@ components:
1052410524
- $ref: '#/components/schemas/EntityV3Datastore'
1052510525
- $ref: '#/components/schemas/EntityV3Queue'
1052610526
- $ref: '#/components/schemas/EntityV3System'
10527+
- $ref: '#/components/schemas/EntityV3API'
10528+
EntityV3API:
10529+
additionalProperties: false
10530+
description: Schema for API entities.
10531+
properties:
10532+
apiVersion:
10533+
$ref: '#/components/schemas/EntityV3APIVersion'
10534+
datadog:
10535+
$ref: '#/components/schemas/EntityV3APIDatadog'
10536+
extensions:
10537+
additionalProperties: {}
10538+
description: Custom extensions. This is the free-formed field to send client-side
10539+
metadata. No Datadog features are affected by this field.
10540+
type: object
10541+
integrations:
10542+
$ref: '#/components/schemas/EntityV3Integrations'
10543+
kind:
10544+
$ref: '#/components/schemas/EntityV3APIKind'
10545+
metadata:
10546+
$ref: '#/components/schemas/EntityV3Metadata'
10547+
spec:
10548+
$ref: '#/components/schemas/EntityV3APISpec'
10549+
required:
10550+
- apiVersion
10551+
- kind
10552+
- metadata
10553+
type: object
10554+
EntityV3APIDatadog:
10555+
additionalProperties: false
10556+
description: Datadog product integrations for the API entity.
10557+
properties:
10558+
codeLocations:
10559+
$ref: '#/components/schemas/EntityV3DatadogCodeLocations'
10560+
events:
10561+
$ref: '#/components/schemas/EntityV3DatadogEvents'
10562+
logs:
10563+
$ref: '#/components/schemas/EntityV3DatadogLogs'
10564+
performanceData:
10565+
$ref: '#/components/schemas/EntityV3DatadogPerformance'
10566+
pipelines:
10567+
$ref: '#/components/schemas/EntityV3DatadogPipelines'
10568+
type: object
10569+
EntityV3APIKind:
10570+
description: The definition of Entity V3 API Kind object.
10571+
enum:
10572+
- api
10573+
example: api
10574+
type: string
10575+
x-enum-varnames:
10576+
- API
10577+
EntityV3APISpec:
10578+
additionalProperties: false
10579+
description: The definition of Entity V3 API Spec object.
10580+
properties:
10581+
implementedBy:
10582+
description: Services which implemented the API.
10583+
items:
10584+
type: string
10585+
type: array
10586+
interface:
10587+
$ref: '#/components/schemas/EntityV3APISpecInterface'
10588+
lifecycle:
10589+
description: The lifecycle state of the component.
10590+
minLength: 1
10591+
type: string
10592+
tier:
10593+
description: The importance of the component.
10594+
minLength: 1
10595+
type: string
10596+
type:
10597+
description: The type of API.
10598+
type: string
10599+
type: object
10600+
EntityV3APISpecInterface:
10601+
additionalProperties: false
10602+
description: The API definition.
10603+
oneOf:
10604+
- $ref: '#/components/schemas/EntityV3APISpecInterfaceFileRef'
10605+
- $ref: '#/components/schemas/EntityV3APISpecInterfaceDefinition'
10606+
EntityV3APISpecInterfaceDefinition:
10607+
additionalProperties: false
10608+
description: The definition of `EntityV3APISpecInterfaceDefinition` object.
10609+
properties:
10610+
definition:
10611+
description: The API definition.
10612+
type: object
10613+
EntityV3APISpecInterfaceFileRef:
10614+
additionalProperties: false
10615+
description: The definition of `EntityV3APISpecInterfaceFileRef` object.
10616+
properties:
10617+
fileRef:
10618+
description: The reference to the API definition file.
10619+
type: string
1052710620
EntityV3APIVersion:
1052810621
description: The schema version of entity type. The field is known as schema-version
1052910622
in the previous version.

packages/datadog-api-client-v2/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,13 @@ export { EntityToRawSchema } from "./models/EntityToRawSchema";
12331233
export { EntityToRelatedEntities } from "./models/EntityToRelatedEntities";
12341234
export { EntityToSchema } from "./models/EntityToSchema";
12351235
export { EntityV3 } from "./models/EntityV3";
1236+
export { EntityV3API } from "./models/EntityV3API";
1237+
export { EntityV3APIDatadog } from "./models/EntityV3APIDatadog";
1238+
export { EntityV3APIKind } from "./models/EntityV3APIKind";
1239+
export { EntityV3APISpec } from "./models/EntityV3APISpec";
1240+
export { EntityV3APISpecInterface } from "./models/EntityV3APISpecInterface";
1241+
export { EntityV3APISpecInterfaceDefinition } from "./models/EntityV3APISpecInterfaceDefinition";
1242+
export { EntityV3APISpecInterfaceFileRef } from "./models/EntityV3APISpecInterfaceFileRef";
12361243
export { EntityV3APIVersion } from "./models/EntityV3APIVersion";
12371244
export { EntityV3DatadogCodeLocationItem } from "./models/EntityV3DatadogCodeLocationItem";
12381245
export { EntityV3DatadogEventItem } from "./models/EntityV3DatadogEventItem";

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { EntityV3API } from "./EntityV3API";
67
import { EntityV3Datastore } from "./EntityV3Datastore";
78
import { EntityV3Queue } from "./EntityV3Queue";
89
import { EntityV3Service } from "./EntityV3Service";
@@ -19,4 +20,5 @@ export type EntityV3 =
1920
| EntityV3Datastore
2021
| EntityV3Queue
2122
| EntityV3System
23+
| EntityV3API
2224
| UnparsedObject;
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { EntityV3APIDatadog } from "./EntityV3APIDatadog";
7+
import { EntityV3APIKind } from "./EntityV3APIKind";
8+
import { EntityV3APISpec } from "./EntityV3APISpec";
9+
import { EntityV3APIVersion } from "./EntityV3APIVersion";
10+
import { EntityV3Integrations } from "./EntityV3Integrations";
11+
import { EntityV3Metadata } from "./EntityV3Metadata";
12+
13+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
14+
15+
/**
16+
* Schema for API entities.
17+
*/
18+
export class EntityV3API {
19+
/**
20+
* The schema version of entity type. The field is known as schema-version in the previous version.
21+
*/
22+
"apiVersion": EntityV3APIVersion;
23+
/**
24+
* Datadog product integrations for the API entity.
25+
*/
26+
"datadog"?: EntityV3APIDatadog;
27+
/**
28+
* Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
29+
*/
30+
"extensions"?: { [key: string]: any };
31+
/**
32+
* A base schema for defining third-party integrations.
33+
*/
34+
"integrations"?: EntityV3Integrations;
35+
/**
36+
* The definition of Entity V3 API Kind object.
37+
*/
38+
"kind": EntityV3APIKind;
39+
/**
40+
* The definition of Entity V3 Metadata object.
41+
*/
42+
"metadata": EntityV3Metadata;
43+
/**
44+
* The definition of Entity V3 API Spec object.
45+
*/
46+
"spec"?: EntityV3APISpec;
47+
48+
/**
49+
* @ignore
50+
*/
51+
"_unparsed"?: boolean;
52+
53+
/**
54+
* @ignore
55+
*/
56+
static readonly attributeTypeMap: AttributeTypeMap = {
57+
apiVersion: {
58+
baseName: "apiVersion",
59+
type: "EntityV3APIVersion",
60+
required: true,
61+
},
62+
datadog: {
63+
baseName: "datadog",
64+
type: "EntityV3APIDatadog",
65+
},
66+
extensions: {
67+
baseName: "extensions",
68+
type: "{ [key: string]: any; }",
69+
},
70+
integrations: {
71+
baseName: "integrations",
72+
type: "EntityV3Integrations",
73+
},
74+
kind: {
75+
baseName: "kind",
76+
type: "EntityV3APIKind",
77+
required: true,
78+
},
79+
metadata: {
80+
baseName: "metadata",
81+
type: "EntityV3Metadata",
82+
required: true,
83+
},
84+
spec: {
85+
baseName: "spec",
86+
type: "EntityV3APISpec",
87+
},
88+
};
89+
90+
/**
91+
* @ignore
92+
*/
93+
static getAttributeTypeMap(): AttributeTypeMap {
94+
return EntityV3API.attributeTypeMap;
95+
}
96+
97+
public constructor() {}
98+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { EntityV3DatadogCodeLocationItem } from "./EntityV3DatadogCodeLocationItem";
7+
import { EntityV3DatadogEventItem } from "./EntityV3DatadogEventItem";
8+
import { EntityV3DatadogLogItem } from "./EntityV3DatadogLogItem";
9+
import { EntityV3DatadogPerformance } from "./EntityV3DatadogPerformance";
10+
import { EntityV3DatadogPipelines } from "./EntityV3DatadogPipelines";
11+
12+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
13+
14+
/**
15+
* Datadog product integrations for the API entity.
16+
*/
17+
export class EntityV3APIDatadog {
18+
/**
19+
* Schema for mapping source code locations to an entity.
20+
*/
21+
"codeLocations"?: Array<EntityV3DatadogCodeLocationItem>;
22+
/**
23+
* Events associations.
24+
*/
25+
"events"?: Array<EntityV3DatadogEventItem>;
26+
/**
27+
* Logs association.
28+
*/
29+
"logs"?: Array<EntityV3DatadogLogItem>;
30+
/**
31+
* Performance stats association.
32+
*/
33+
"performanceData"?: EntityV3DatadogPerformance;
34+
/**
35+
* CI Pipelines association.
36+
*/
37+
"pipelines"?: EntityV3DatadogPipelines;
38+
39+
/**
40+
* @ignore
41+
*/
42+
"_unparsed"?: boolean;
43+
44+
/**
45+
* @ignore
46+
*/
47+
static readonly attributeTypeMap: AttributeTypeMap = {
48+
codeLocations: {
49+
baseName: "codeLocations",
50+
type: "Array<EntityV3DatadogCodeLocationItem>",
51+
},
52+
events: {
53+
baseName: "events",
54+
type: "Array<EntityV3DatadogEventItem>",
55+
},
56+
logs: {
57+
baseName: "logs",
58+
type: "Array<EntityV3DatadogLogItem>",
59+
},
60+
performanceData: {
61+
baseName: "performanceData",
62+
type: "EntityV3DatadogPerformance",
63+
},
64+
pipelines: {
65+
baseName: "pipelines",
66+
type: "EntityV3DatadogPipelines",
67+
},
68+
};
69+
70+
/**
71+
* @ignore
72+
*/
73+
static getAttributeTypeMap(): AttributeTypeMap {
74+
return EntityV3APIDatadog.attributeTypeMap;
75+
}
76+
77+
public constructor() {}
78+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { UnparsedObject } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* The definition of Entity V3 API Kind object.
11+
*/
12+
13+
export type EntityV3APIKind = typeof API | UnparsedObject;
14+
export const API = "api";

0 commit comments

Comments
 (0)