Skip to content
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:33.181521",
"spec_repo_commit": "1cc45c45"
"regenerated": "2025-04-02 20:49:30.088491",
"spec_repo_commit": "9ea284b5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-02 19:55:33.196965",
"spec_repo_commit": "1cc45c45"
"regenerated": "2025-04-02 20:49:30.104275",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** The definition of Entity V3 Datastore Spec object. */
@JsonPropertyOrder({
EntityV3DatastoreSpec.JSON_PROPERTY_COMPONENT_OF,
EntityV3DatastoreSpec.JSON_PROPERTY_LIFECYCLE,
EntityV3DatastoreSpec.JSON_PROPERTY_TIER,
EntityV3DatastoreSpec.JSON_PROPERTY_TYPE
Expand All @@ -22,6 +25,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class EntityV3DatastoreSpec {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
private List<String> componentOf = null;

public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle";
private String lifecycle;

Expand All @@ -31,6 +37,35 @@ public class EntityV3DatastoreSpec {
public static final String JSON_PROPERTY_TYPE = "type";
private String type;

public EntityV3DatastoreSpec componentOf(List<String> componentOf) {
this.componentOf = componentOf;
return this;
}

public EntityV3DatastoreSpec addComponentOfItem(String componentOfItem) {
if (this.componentOf == null) {
this.componentOf = new ArrayList<>();
}
this.componentOf.add(componentOfItem);
return this;
}

/**
* A list of components the datastore is a part of
*
* @return componentOf
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getComponentOf() {
return componentOf;
}

public void setComponentOf(List<String> componentOf) {
this.componentOf = componentOf;
}

public EntityV3DatastoreSpec lifecycle(String lifecycle) {
this.lifecycle = lifecycle;
return this;
Expand Down Expand Up @@ -104,20 +139,22 @@ public boolean equals(Object o) {
return false;
}
EntityV3DatastoreSpec entityV3DatastoreSpec = (EntityV3DatastoreSpec) o;
return Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle)
return Objects.equals(this.componentOf, entityV3DatastoreSpec.componentOf)
&& Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle)
&& Objects.equals(this.tier, entityV3DatastoreSpec.tier)
&& Objects.equals(this.type, entityV3DatastoreSpec.type);
}

@Override
public int hashCode() {
return Objects.hash(lifecycle, tier, type);
return Objects.hash(componentOf, lifecycle, tier, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EntityV3DatastoreSpec {\n");
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");
sb.append(" tier: ").append(toIndentedString(tier)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** The definition of Entity V3 Queue Spec object. */
@JsonPropertyOrder({
EntityV3QueueSpec.JSON_PROPERTY_COMPONENT_OF,
EntityV3QueueSpec.JSON_PROPERTY_LIFECYCLE,
EntityV3QueueSpec.JSON_PROPERTY_TIER,
EntityV3QueueSpec.JSON_PROPERTY_TYPE
Expand All @@ -22,6 +25,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class EntityV3QueueSpec {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
private List<String> componentOf = null;

public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle";
private String lifecycle;

Expand All @@ -31,6 +37,35 @@ public class EntityV3QueueSpec {
public static final String JSON_PROPERTY_TYPE = "type";
private String type;

public EntityV3QueueSpec componentOf(List<String> componentOf) {
this.componentOf = componentOf;
return this;
}

public EntityV3QueueSpec addComponentOfItem(String componentOfItem) {
if (this.componentOf == null) {
this.componentOf = new ArrayList<>();
}
this.componentOf.add(componentOfItem);
return this;
}

/**
* A list of components the queue is a part of
*
* @return componentOf
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getComponentOf() {
return componentOf;
}

public void setComponentOf(List<String> componentOf) {
this.componentOf = componentOf;
}

public EntityV3QueueSpec lifecycle(String lifecycle) {
this.lifecycle = lifecycle;
return this;
Expand Down Expand Up @@ -104,20 +139,22 @@ public boolean equals(Object o) {
return false;
}
EntityV3QueueSpec entityV3QueueSpec = (EntityV3QueueSpec) o;
return Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle)
return Objects.equals(this.componentOf, entityV3QueueSpec.componentOf)
&& Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle)
&& Objects.equals(this.tier, entityV3QueueSpec.tier)
&& Objects.equals(this.type, entityV3QueueSpec.type);
}

@Override
public int hashCode() {
return Objects.hash(lifecycle, tier, type);
return Objects.hash(componentOf, lifecycle, tier, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EntityV3QueueSpec {\n");
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");
sb.append(" tier: ").append(toIndentedString(tier)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

/** The definition of Entity V3 Service Spec object. */
@JsonPropertyOrder({
EntityV3ServiceSpec.JSON_PROPERTY_COMPONENT_OF,
EntityV3ServiceSpec.JSON_PROPERTY_DEPENDS_ON,
EntityV3ServiceSpec.JSON_PROPERTY_LANGUAGES,
EntityV3ServiceSpec.JSON_PROPERTY_LIFECYCLE,
Expand All @@ -26,6 +27,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class EntityV3ServiceSpec {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf";
private List<String> componentOf = null;

public static final String JSON_PROPERTY_DEPENDS_ON = "dependsOn";
private List<String> dependsOn = null;

Expand All @@ -41,6 +45,35 @@ public class EntityV3ServiceSpec {
public static final String JSON_PROPERTY_TYPE = "type";
private String type;

public EntityV3ServiceSpec componentOf(List<String> componentOf) {
this.componentOf = componentOf;
return this;
}

public EntityV3ServiceSpec addComponentOfItem(String componentOfItem) {
if (this.componentOf == null) {
this.componentOf = new ArrayList<>();
}
this.componentOf.add(componentOfItem);
return this;
}

/**
* A list of components the service is a part of
*
* @return componentOf
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPONENT_OF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getComponentOf() {
return componentOf;
}

public void setComponentOf(List<String> componentOf) {
this.componentOf = componentOf;
}

public EntityV3ServiceSpec dependsOn(List<String> dependsOn) {
this.dependsOn = dependsOn;
return this;
Expand Down Expand Up @@ -172,7 +205,8 @@ public boolean equals(Object o) {
return false;
}
EntityV3ServiceSpec entityV3ServiceSpec = (EntityV3ServiceSpec) o;
return Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn)
return Objects.equals(this.componentOf, entityV3ServiceSpec.componentOf)
&& Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn)
&& Objects.equals(this.languages, entityV3ServiceSpec.languages)
&& Objects.equals(this.lifecycle, entityV3ServiceSpec.lifecycle)
&& Objects.equals(this.tier, entityV3ServiceSpec.tier)
Expand All @@ -181,13 +215,14 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(dependsOn, languages, lifecycle, tier, type);
return Objects.hash(componentOf, dependsOn, languages, lifecycle, tier, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EntityV3ServiceSpec {\n");
sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n");
sb.append(" dependsOn: ").append(toIndentedString(dependsOn)).append("\n");
sb.append(" languages: ").append(toIndentedString(languages)).append("\n");
sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n");
Expand Down
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