Skip to content

Commit 3ad27c1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9ea284b5 of spec repo
1 parent ccec07d commit 3ad27c1

File tree

7 files changed

+76
-6
lines changed

7 files changed

+76
-6
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-04-02 19:55:35.907729",
8-
"spec_repo_commit": "1cc45c45"
7+
"regenerated": "2025-04-02 20:49:26.182585",
8+
"spec_repo_commit": "9ea284b5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-02 19:55:35.923557",
13-
"spec_repo_commit": "1cc45c45"
12+
"regenerated": "2025-04-02 20:49:26.197607",
13+
"spec_repo_commit": "9ea284b5"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12431,6 +12431,11 @@ components:
1243112431
additionalProperties: false
1243212432
description: The definition of Entity V3 Datastore Spec object.
1243312433
properties:
12434+
componentOf:
12435+
description: A list of components the datastore is a part of
12436+
items:
12437+
type: string
12438+
type: array
1243412439
lifecycle:
1243512440
description: The lifecycle state of the datastore.
1243612441
minLength: 1
@@ -12629,6 +12634,11 @@ components:
1262912634
additionalProperties: false
1263012635
description: The definition of Entity V3 Queue Spec object.
1263112636
properties:
12637+
componentOf:
12638+
description: A list of components the queue is a part of
12639+
items:
12640+
type: string
12641+
type: array
1263212642
lifecycle:
1263312643
description: The lifecycle state of the queue.
1263412644
minLength: 1
@@ -12694,6 +12704,11 @@ components:
1269412704
additionalProperties: false
1269512705
description: The definition of Entity V3 Service Spec object.
1269612706
properties:
12707+
componentOf:
12708+
description: A list of components the service is a part of
12709+
items:
12710+
type: string
12711+
type: array
1269712712
dependsOn:
1269812713
description: A list of components the service depends on.
1269912714
items:

examples/v2_software-catalog_UpsertCatalogEntity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ async fn main() {
6464
)
6565
.spec(
6666
EntityV3ServiceSpec::new()
67+
.component_of(vec![])
6768
.depends_on(vec![])
6869
.languages(vec![]),
6970
),

src/datadogV2/model/model_entity_v3_datastore_spec.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct EntityV3DatastoreSpec {
14+
/// A list of components the datastore is a part of
15+
#[serde(rename = "componentOf")]
16+
pub component_of: Option<Vec<String>>,
1417
/// The lifecycle state of the datastore.
1518
#[serde(rename = "lifecycle")]
1619
pub lifecycle: Option<String>,
@@ -28,13 +31,19 @@ pub struct EntityV3DatastoreSpec {
2831
impl EntityV3DatastoreSpec {
2932
pub fn new() -> EntityV3DatastoreSpec {
3033
EntityV3DatastoreSpec {
34+
component_of: None,
3135
lifecycle: None,
3236
tier: None,
3337
type_: None,
3438
_unparsed: false,
3539
}
3640
}
3741

42+
pub fn component_of(mut self, value: Vec<String>) -> Self {
43+
self.component_of = Some(value);
44+
self
45+
}
46+
3847
pub fn lifecycle(mut self, value: String) -> Self {
3948
self.lifecycle = Some(value);
4049
self
@@ -74,13 +83,21 @@ impl<'de> Deserialize<'de> for EntityV3DatastoreSpec {
7483
where
7584
M: MapAccess<'a>,
7685
{
86+
let mut component_of: Option<Vec<String>> = None;
7787
let mut lifecycle: Option<String> = None;
7888
let mut tier: Option<String> = None;
7989
let mut type_: Option<String> = None;
8090
let mut _unparsed = false;
8191

8292
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
8393
match k.as_str() {
94+
"componentOf" => {
95+
if v.is_null() {
96+
continue;
97+
}
98+
component_of =
99+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
100+
}
84101
"lifecycle" => {
85102
if v.is_null() {
86103
continue;
@@ -108,6 +125,7 @@ impl<'de> Deserialize<'de> for EntityV3DatastoreSpec {
108125
}
109126

110127
let content = EntityV3DatastoreSpec {
128+
component_of,
111129
lifecycle,
112130
tier,
113131
type_,

src/datadogV2/model/model_entity_v3_queue_spec.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct EntityV3QueueSpec {
14+
/// A list of components the queue is a part of
15+
#[serde(rename = "componentOf")]
16+
pub component_of: Option<Vec<String>>,
1417
/// The lifecycle state of the queue.
1518
#[serde(rename = "lifecycle")]
1619
pub lifecycle: Option<String>,
@@ -28,13 +31,19 @@ pub struct EntityV3QueueSpec {
2831
impl EntityV3QueueSpec {
2932
pub fn new() -> EntityV3QueueSpec {
3033
EntityV3QueueSpec {
34+
component_of: None,
3135
lifecycle: None,
3236
tier: None,
3337
type_: None,
3438
_unparsed: false,
3539
}
3640
}
3741

42+
pub fn component_of(mut self, value: Vec<String>) -> Self {
43+
self.component_of = Some(value);
44+
self
45+
}
46+
3847
pub fn lifecycle(mut self, value: String) -> Self {
3948
self.lifecycle = Some(value);
4049
self
@@ -74,13 +83,21 @@ impl<'de> Deserialize<'de> for EntityV3QueueSpec {
7483
where
7584
M: MapAccess<'a>,
7685
{
86+
let mut component_of: Option<Vec<String>> = None;
7787
let mut lifecycle: Option<String> = None;
7888
let mut tier: Option<String> = None;
7989
let mut type_: Option<String> = None;
8090
let mut _unparsed = false;
8191

8292
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
8393
match k.as_str() {
94+
"componentOf" => {
95+
if v.is_null() {
96+
continue;
97+
}
98+
component_of =
99+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
100+
}
84101
"lifecycle" => {
85102
if v.is_null() {
86103
continue;
@@ -108,6 +125,7 @@ impl<'de> Deserialize<'de> for EntityV3QueueSpec {
108125
}
109126

110127
let content = EntityV3QueueSpec {
128+
component_of,
111129
lifecycle,
112130
tier,
113131
type_,

src/datadogV2/model/model_entity_v3_service_spec.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct EntityV3ServiceSpec {
14+
/// A list of components the service is a part of
15+
#[serde(rename = "componentOf")]
16+
pub component_of: Option<Vec<String>>,
1417
/// A list of components the service depends on.
1518
#[serde(rename = "dependsOn")]
1619
pub depends_on: Option<Vec<String>>,
@@ -34,6 +37,7 @@ pub struct EntityV3ServiceSpec {
3437
impl EntityV3ServiceSpec {
3538
pub fn new() -> EntityV3ServiceSpec {
3639
EntityV3ServiceSpec {
40+
component_of: None,
3741
depends_on: None,
3842
languages: None,
3943
lifecycle: None,
@@ -43,6 +47,11 @@ impl EntityV3ServiceSpec {
4347
}
4448
}
4549

50+
pub fn component_of(mut self, value: Vec<String>) -> Self {
51+
self.component_of = Some(value);
52+
self
53+
}
54+
4655
pub fn depends_on(mut self, value: Vec<String>) -> Self {
4756
self.depends_on = Some(value);
4857
self
@@ -92,6 +101,7 @@ impl<'de> Deserialize<'de> for EntityV3ServiceSpec {
92101
where
93102
M: MapAccess<'a>,
94103
{
104+
let mut component_of: Option<Vec<String>> = None;
95105
let mut depends_on: Option<Vec<String>> = None;
96106
let mut languages: Option<Vec<String>> = None;
97107
let mut lifecycle: Option<String> = None;
@@ -101,6 +111,13 @@ impl<'de> Deserialize<'de> for EntityV3ServiceSpec {
101111

102112
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
103113
match k.as_str() {
114+
"componentOf" => {
115+
if v.is_null() {
116+
continue;
117+
}
118+
component_of =
119+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
120+
}
104121
"dependsOn" => {
105122
if v.is_null() {
106123
continue;
@@ -140,6 +157,7 @@ impl<'de> Deserialize<'de> for EntityV3ServiceSpec {
140157
}
141158

142159
let content = EntityV3ServiceSpec {
160+
component_of,
143161
depends_on,
144162
languages,
145163
lifecycle,

tests/scenarios/features/v2/software_catalog.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: Software Catalog
1010
@generated @skip @team:DataDog/service-catalog
1111
Scenario: Create or update entities returns "ACCEPTED" response
1212
Given new "UpsertCatalogEntity" request
13-
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": []}}
13+
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": []}}
1414
When the request is sent
1515
Then the response status is 202 ACCEPTED
1616

1717
@generated @skip @team:DataDog/service-catalog
1818
Scenario: Create or update entities returns "Bad Request" response
1919
Given new "UpsertCatalogEntity" request
20-
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": []}}
20+
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": []}}
2121
When the request is sent
2222
Then the response status is 400 Bad Request
2323

0 commit comments

Comments
 (0)