Skip to content

Commit

Permalink
Add support for Entity kind API (#2031)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Feb 3, 2025
1 parent e9ed1aa commit 50f6a6d
Show file tree
Hide file tree
Showing 12 changed files with 486 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-31 15:03:07.790966",
"spec_repo_commit": "b01f90f4"
"regenerated": "2025-02-03 15:47:58.970655",
"spec_repo_commit": "d6014add"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-31 15:03:07.806862",
"spec_repo_commit": "b01f90f4"
"regenerated": "2025-02-03 15:47:58.986107",
"spec_repo_commit": "d6014add"
}
}
}
93 changes: 93 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10524,6 +10524,99 @@ components:
- $ref: '#/components/schemas/EntityV3Datastore'
- $ref: '#/components/schemas/EntityV3Queue'
- $ref: '#/components/schemas/EntityV3System'
- $ref: '#/components/schemas/EntityV3API'
EntityV3API:
additionalProperties: false
description: Schema for API entities.
properties:
apiVersion:
$ref: '#/components/schemas/EntityV3APIVersion'
datadog:
$ref: '#/components/schemas/EntityV3APIDatadog'
extensions:
additionalProperties: {}
description: Custom extensions. This is the free-formed field to send client-side
metadata. No Datadog features are affected by this field.
type: object
integrations:
$ref: '#/components/schemas/EntityV3Integrations'
kind:
$ref: '#/components/schemas/EntityV3APIKind'
metadata:
$ref: '#/components/schemas/EntityV3Metadata'
spec:
$ref: '#/components/schemas/EntityV3APISpec'
required:
- apiVersion
- kind
- metadata
type: object
EntityV3APIDatadog:
additionalProperties: false
description: Datadog product integrations for the API entity.
properties:
codeLocations:
$ref: '#/components/schemas/EntityV3DatadogCodeLocations'
events:
$ref: '#/components/schemas/EntityV3DatadogEvents'
logs:
$ref: '#/components/schemas/EntityV3DatadogLogs'
performanceData:
$ref: '#/components/schemas/EntityV3DatadogPerformance'
pipelines:
$ref: '#/components/schemas/EntityV3DatadogPipelines'
type: object
EntityV3APIKind:
description: The definition of Entity V3 API Kind object.
enum:
- api
example: api
type: string
x-enum-varnames:
- API
EntityV3APISpec:
additionalProperties: false
description: The definition of Entity V3 API Spec object.
properties:
implementedBy:
description: Services which implemented the API.
items:
type: string
type: array
interface:
$ref: '#/components/schemas/EntityV3APISpecInterface'
lifecycle:
description: The lifecycle state of the component.
minLength: 1
type: string
tier:
description: The importance of the component.
minLength: 1
type: string
type:
description: The type of API.
type: string
type: object
EntityV3APISpecInterface:
additionalProperties: false
description: The API definition.
oneOf:
- $ref: '#/components/schemas/EntityV3APISpecInterfaceFileRef'
- $ref: '#/components/schemas/EntityV3APISpecInterfaceDefinition'
EntityV3APISpecInterfaceDefinition:
additionalProperties: false
description: The definition of `EntityV3APISpecInterfaceDefinition` object.
properties:
definition:
description: The API definition.
type: object
EntityV3APISpecInterfaceFileRef:
additionalProperties: false
description: The definition of `EntityV3APISpecInterfaceFileRef` object.
properties:
fileRef:
description: The reference to the API definition file.
type: string
EntityV3APIVersion:
description: The schema version of entity type. The field is known as schema-version
in the previous version.
Expand Down
7 changes: 7 additions & 0 deletions packages/datadog-api-client-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,13 @@ export { EntityToRawSchema } from "./models/EntityToRawSchema";
export { EntityToRelatedEntities } from "./models/EntityToRelatedEntities";
export { EntityToSchema } from "./models/EntityToSchema";
export { EntityV3 } from "./models/EntityV3";
export { EntityV3API } from "./models/EntityV3API";
export { EntityV3APIDatadog } from "./models/EntityV3APIDatadog";
export { EntityV3APIKind } from "./models/EntityV3APIKind";
export { EntityV3APISpec } from "./models/EntityV3APISpec";
export { EntityV3APISpecInterface } from "./models/EntityV3APISpecInterface";
export { EntityV3APISpecInterfaceDefinition } from "./models/EntityV3APISpecInterfaceDefinition";
export { EntityV3APISpecInterfaceFileRef } from "./models/EntityV3APISpecInterfaceFileRef";
export { EntityV3APIVersion } from "./models/EntityV3APIVersion";
export { EntityV3DatadogCodeLocationItem } from "./models/EntityV3DatadogCodeLocationItem";
export { EntityV3DatadogEventItem } from "./models/EntityV3DatadogEventItem";
Expand Down
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v2/models/EntityV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { EntityV3API } from "./EntityV3API";
import { EntityV3Datastore } from "./EntityV3Datastore";
import { EntityV3Queue } from "./EntityV3Queue";
import { EntityV3Service } from "./EntityV3Service";
Expand All @@ -19,4 +20,5 @@ export type EntityV3 =
| EntityV3Datastore
| EntityV3Queue
| EntityV3System
| EntityV3API
| UnparsedObject;
98 changes: 98 additions & 0 deletions packages/datadog-api-client-v2/models/EntityV3API.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { EntityV3APIDatadog } from "./EntityV3APIDatadog";
import { EntityV3APIKind } from "./EntityV3APIKind";
import { EntityV3APISpec } from "./EntityV3APISpec";
import { EntityV3APIVersion } from "./EntityV3APIVersion";
import { EntityV3Integrations } from "./EntityV3Integrations";
import { EntityV3Metadata } from "./EntityV3Metadata";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Schema for API entities.
*/
export class EntityV3API {
/**
* The schema version of entity type. The field is known as schema-version in the previous version.
*/
"apiVersion": EntityV3APIVersion;
/**
* Datadog product integrations for the API entity.
*/
"datadog"?: EntityV3APIDatadog;
/**
* Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
*/
"extensions"?: { [key: string]: any };
/**
* A base schema for defining third-party integrations.
*/
"integrations"?: EntityV3Integrations;
/**
* The definition of Entity V3 API Kind object.
*/
"kind": EntityV3APIKind;
/**
* The definition of Entity V3 Metadata object.
*/
"metadata": EntityV3Metadata;
/**
* The definition of Entity V3 API Spec object.
*/
"spec"?: EntityV3APISpec;

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
apiVersion: {
baseName: "apiVersion",
type: "EntityV3APIVersion",
required: true,
},
datadog: {
baseName: "datadog",
type: "EntityV3APIDatadog",
},
extensions: {
baseName: "extensions",
type: "{ [key: string]: any; }",
},
integrations: {
baseName: "integrations",
type: "EntityV3Integrations",
},
kind: {
baseName: "kind",
type: "EntityV3APIKind",
required: true,
},
metadata: {
baseName: "metadata",
type: "EntityV3Metadata",
required: true,
},
spec: {
baseName: "spec",
type: "EntityV3APISpec",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return EntityV3API.attributeTypeMap;
}

public constructor() {}
}
78 changes: 78 additions & 0 deletions packages/datadog-api-client-v2/models/EntityV3APIDatadog.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { EntityV3DatadogCodeLocationItem } from "./EntityV3DatadogCodeLocationItem";
import { EntityV3DatadogEventItem } from "./EntityV3DatadogEventItem";
import { EntityV3DatadogLogItem } from "./EntityV3DatadogLogItem";
import { EntityV3DatadogPerformance } from "./EntityV3DatadogPerformance";
import { EntityV3DatadogPipelines } from "./EntityV3DatadogPipelines";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Datadog product integrations for the API entity.
*/
export class EntityV3APIDatadog {
/**
* Schema for mapping source code locations to an entity.
*/
"codeLocations"?: Array<EntityV3DatadogCodeLocationItem>;
/**
* Events associations.
*/
"events"?: Array<EntityV3DatadogEventItem>;
/**
* Logs association.
*/
"logs"?: Array<EntityV3DatadogLogItem>;
/**
* Performance stats association.
*/
"performanceData"?: EntityV3DatadogPerformance;
/**
* CI Pipelines association.
*/
"pipelines"?: EntityV3DatadogPipelines;

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
codeLocations: {
baseName: "codeLocations",
type: "Array<EntityV3DatadogCodeLocationItem>",
},
events: {
baseName: "events",
type: "Array<EntityV3DatadogEventItem>",
},
logs: {
baseName: "logs",
type: "Array<EntityV3DatadogLogItem>",
},
performanceData: {
baseName: "performanceData",
type: "EntityV3DatadogPerformance",
},
pipelines: {
baseName: "pipelines",
type: "EntityV3DatadogPipelines",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return EntityV3APIDatadog.attributeTypeMap;
}

public constructor() {}
}
14 changes: 14 additions & 0 deletions packages/datadog-api-client-v2/models/EntityV3APIKind.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* The definition of Entity V3 API Kind object.
*/

export type EntityV3APIKind = typeof API | UnparsedObject;
export const API = "api";
Loading

0 comments on commit 50f6a6d

Please sign in to comment.