Skip to content

update metrics.yaml for ListMetricAssets and include Dashboard info #812

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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "e4f653f",
"generated": "2025-07-25 14:12:09.627"
"spec_repo_commit": "b737cc4",
"generated": "2025-07-28 13:16:28.685"
}
11 changes: 11 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22867,6 +22867,17 @@ components:
maximum: 5
minimum: 0
type: number
tags:
description: List of tag keys used in the asset.
example:
- env
- service
- host
- datacenter
items:
description: Tag key used in assets.
type: string
type: array
title:
description: Title of the asset.
type: string
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV2/model/model_metric_dashboard_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub struct MetricDashboardAttributes {
/// Value from 0 to 5 that ranks popularity of the dashboard.
#[serde(rename = "popularity")]
pub popularity: Option<f64>,
/// List of tag keys used in the asset.
#[serde(rename = "tags")]
pub tags: Option<Vec<String>>,
/// Title of the asset.
#[serde(rename = "title")]
pub title: Option<String>,
Expand All @@ -31,6 +34,7 @@ impl MetricDashboardAttributes {
pub fn new() -> MetricDashboardAttributes {
MetricDashboardAttributes {
popularity: None,
tags: None,
title: None,
url: None,
additional_properties: std::collections::BTreeMap::new(),
Expand All @@ -43,6 +47,11 @@ impl MetricDashboardAttributes {
self
}

pub fn tags(mut self, value: Vec<String>) -> Self {
self.tags = Some(value);
self
}

pub fn title(mut self, value: String) -> Self {
self.title = Some(value);
self
Expand Down Expand Up @@ -86,6 +95,7 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {
M: MapAccess<'a>,
{
let mut popularity: Option<f64> = None;
let mut tags: Option<Vec<String>> = None;
let mut title: Option<String> = None;
let mut url: Option<String> = None;
let mut additional_properties: std::collections::BTreeMap<
Expand All @@ -102,6 +112,12 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {
}
popularity = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"tags" => {
if v.is_null() {
continue;
}
tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"title" => {
if v.is_null() {
continue;
Expand All @@ -124,6 +140,7 @@ impl<'de> Deserialize<'de> for MetricDashboardAttributes {

let content = MetricDashboardAttributes {
popularity,
tags,
title,
url,
additional_properties,
Expand Down
Loading