Skip to content

Add componentOf field to Service, Queue, and Datastore V3 Software Catalog definitions #2122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-04-02 19:55:31.957447",
"spec_repo_commit": "1cc45c45"
"regenerated": "2025-04-02 20:49:29.894380",
"spec_repo_commit": "9ea284b5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-02 19:55:31.973220",
"spec_repo_commit": "1cc45c45"
"regenerated": "2025-04-02 20:49:29.913373",
"spec_repo_commit": "9ea284b5"
}
}
}
15 changes: 15 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12431,6 +12431,11 @@ components:
additionalProperties: false
description: The definition of Entity V3 Datastore Spec object.
properties:
componentOf:
description: A list of components the datastore is a part of
items:
type: string
type: array
lifecycle:
description: The lifecycle state of the datastore.
minLength: 1
Expand Down Expand Up @@ -12629,6 +12634,11 @@ components:
additionalProperties: false
description: The definition of Entity V3 Queue Spec object.
properties:
componentOf:
description: A list of components the queue is a part of
items:
type: string
type: array
lifecycle:
description: The lifecycle state of the queue.
minLength: 1
Expand Down Expand Up @@ -12694,6 +12704,11 @@ components:
additionalProperties: false
description: The definition of Entity V3 Service Spec object.
properties:
componentOf:
description: A list of components the service is a part of
items:
type: string
type: array
dependsOn:
description: A list of components the service depends on.
items:
Expand Down
1 change: 1 addition & 0 deletions examples/v2/software-catalog/UpsertCatalogEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const params: v2.SoftwareCatalogApiUpsertCatalogEntityRequest = {
tags: ["this:tag", "that:tag"],
},
spec: {
componentOf: [],
dependsOn: [],
languages: [],
},
Expand Down
4 changes: 2 additions & 2 deletions features/v2/software_catalog.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Feature: Software Catalog
@generated @skip @team:DataDog/service-catalog
Scenario: Create or update entities returns "ACCEPTED" response
Given new "UpsertCatalogEntity" request
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}}
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}}
When the request is sent
Then the response status is 202 ACCEPTED

@generated @skip @team:DataDog/service-catalog
Scenario: Create or update entities returns "Bad Request" response
Given new "UpsertCatalogEntity" request
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}}
And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}}
When the request is sent
Then the response status is 400 Bad Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* The definition of Entity V3 Datastore Spec object.
*/
export class EntityV3DatastoreSpec {
/**
* A list of components the datastore is a part of
*/
"componentOf"?: Array<string>;
/**
* The lifecycle state of the datastore.
*/
Expand All @@ -32,6 +36,10 @@ export class EntityV3DatastoreSpec {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
componentOf: {
baseName: "componentOf",
type: "Array<string>",
},
lifecycle: {
baseName: "lifecycle",
type: "string",
Expand Down
8 changes: 8 additions & 0 deletions packages/datadog-api-client-v2/models/EntityV3QueueSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* The definition of Entity V3 Queue Spec object.
*/
export class EntityV3QueueSpec {
/**
* A list of components the queue is a part of
*/
"componentOf"?: Array<string>;
/**
* The lifecycle state of the queue.
*/
Expand All @@ -32,6 +36,10 @@ export class EntityV3QueueSpec {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
componentOf: {
baseName: "componentOf",
type: "Array<string>",
},
lifecycle: {
baseName: "lifecycle",
type: "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* The definition of Entity V3 Service Spec object.
*/
export class EntityV3ServiceSpec {
/**
* A list of components the service is a part of
*/
"componentOf"?: Array<string>;
/**
* A list of components the service depends on.
*/
Expand Down Expand Up @@ -40,6 +44,10 @@ export class EntityV3ServiceSpec {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
componentOf: {
baseName: "componentOf",
type: "Array<string>",
},
dependsOn: {
baseName: "dependsOn",
type: "Array<string>",
Expand Down