From 6ee222fbbd3966027e5c36c2940516a36f1c288e Mon Sep 17 00:00:00 2001 From: "dd-octo-sts[bot]" <200755185+dd-octo-sts[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 12:36:25 +0000 Subject: [PATCH] Regenerate client from spec repo --- Cargo.toml | 2 +- src/auth/callback.rs | 2 ++ src/auth/dcr.rs | 2 ++ src/auth/mod.rs | 2 ++ src/auth/pkce.rs | 2 ++ src/auth/storage.rs | 2 ++ src/auth/types.rs | 2 ++ src/client.rs | 2 ++ src/config.rs | 31 ++----------------------------- src/filter.rs | 2 ++ src/formatter.rs | 2 ++ src/generated.rs | 11 ++++++----- src/useragent.rs | 2 ++ src/util.rs | 2 ++ src/version.rs | 2 ++ 15 files changed, 33 insertions(+), 35 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cab88eb5..d0f262fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -135,7 +135,7 @@ zip = { version = "8", default-features = false, features = ["deflate"], optiona # Datadog API client — pinned to 0.33.0 tag # Use default-features = false; feature sets are activated per-target via features above -datadog-api-client = { git = "https://github.com/DataDog/datadog-api-client-rust", rev = "192bab111da84a83968b12528e4bc6bab7ac94a9", optional = true, default-features = false } +datadog-api-client = { git = "https://github.com/DataDog/datadog-api-client-rust", rev = "58e24c13500c7a360029f26deafe88a147984ee4", optional = true, default-features = false } # HTTP middleware (version-matched to DD client; compiles on all targets) reqwest-middleware = "0.5" diff --git a/src/auth/callback.rs b/src/auth/callback.rs index d55cef01..59c88e27 100644 --- a/src/auth/callback.rs +++ b/src/auth/callback.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + #[cfg(not(target_arch = "wasm32"))] use anyhow::bail; use anyhow::Result; diff --git a/src/auth/dcr.rs b/src/auth/dcr.rs index 22a6ad8e..56fa02c4 100644 --- a/src/auth/dcr.rs +++ b/src/auth/dcr.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + #[cfg(not(target_arch = "wasm32"))] use anyhow::{bail, Context, Result}; #[cfg(not(target_arch = "wasm32"))] diff --git a/src/auth/mod.rs b/src/auth/mod.rs index f86404f9..90519af2 100644 --- a/src/auth/mod.rs +++ b/src/auth/mod.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + pub mod callback; pub mod dcr; pub mod pkce; diff --git a/src/auth/pkce.rs b/src/auth/pkce.rs index 737f7b3e..5832cee5 100644 --- a/src/auth/pkce.rs +++ b/src/auth/pkce.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + #[cfg(not(target_arch = "wasm32"))] use anyhow::Result; #[cfg(not(target_arch = "wasm32"))] diff --git a/src/auth/storage.rs b/src/auth/storage.rs index ce48dca0..8d69d6a5 100644 --- a/src/auth/storage.rs +++ b/src/auth/storage.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use anyhow::{Context, Result}; use std::path::PathBuf; diff --git a/src/auth/types.rs b/src/auth/types.rs index 5feb8fdb..d300aab8 100644 --- a/src/auth/types.rs +++ b/src/auth/types.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use chrono::Utc; use serde::{Deserialize, Serialize}; diff --git a/src/client.rs b/src/client.rs index 96fbf863..0ded67df 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use reqwest_middleware::{ClientBuilder, ClientWithMiddleware}; #[cfg(not(target_arch = "wasm32"))] diff --git a/src/config.rs b/src/config.rs index 0c9e766f..cbbad8a4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use anyhow::{bail, Result}; #[cfg(not(feature = "browser"))] use serde::Deserialize; @@ -371,17 +373,6 @@ impl Config { Ok(()) } - /// Validate that DD_API_KEY is configured for API-key-only endpoints. - pub fn validate_api_key_only(&self) -> Result<()> { - if self.api_key.is_none() { - bail!( - "this command requires DD_API_KEY — \ - OAuth2 bearer tokens are not supported here" - ); - } - Ok(()) - } - pub fn has_api_keys(&self) -> bool { self.api_key.is_some() && self.app_key.is_some() } @@ -990,24 +981,6 @@ mod tests { assert!(cfg.validate_api_and_app_keys().is_err()); } - #[test] - fn test_validate_api_key_only_accepts_api_key_without_app_key() { - let cfg = make_cfg(Some("key"), None, None); - assert!(cfg.validate_api_key_only().is_ok()); - } - - #[test] - fn test_validate_api_key_only_rejects_bearer_only() { - let cfg = make_cfg(None, None, Some("token")); - assert!(cfg.validate_api_key_only().is_err()); - } - - #[test] - fn test_validate_api_key_only_rejects_missing_api_key() { - let cfg = make_cfg(None, Some("app"), None); - assert!(cfg.validate_api_key_only().is_err()); - } - #[test] fn test_validate_auth_api_keys() { let cfg = make_cfg(Some("key"), Some("app"), None); diff --git a/src/filter.rs b/src/filter.rs index a75d84eb..01b03e7e 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + //! jq filter support via the [`jaq`](https://github.com/01mf02/jaq) engine. //! //! [`apply_jq`] is the sole public entry point; the jaq API is encapsulated diff --git a/src/formatter.rs b/src/formatter.rs index 19360fe5..198983e2 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use anyhow::Result; use serde::Serialize; diff --git a/src/generated.rs b/src/generated.rs index 4fe4a5cd..4ed4cec9 100644 --- a/src/generated.rs +++ b/src/generated.rs @@ -1,15 +1,16 @@ -// Stable integration point for openapi-transformer-generated pup commands. -// -// Future regenerations add variants to `GeneratedCommand` (and new modules -// alongside this file) in place; main.rs never needs to change again. +// Code generated by openapi-transformer. DO NOT EDIT. use anyhow::Result; use crate::config::Config; +/// All spec-generated pup commands. +/// +/// Re-run the generator to add or remove tags; pup never needs manual changes +/// for new commands. #[derive(clap::Subcommand)] pub enum GeneratedCommand {} -pub async fn run(_cfg: &Config, command: GeneratedCommand) -> Result<()> { +pub async fn run(cfg: &Config, command: GeneratedCommand) -> Result<()> { match command {} } diff --git a/src/useragent.rs b/src/useragent.rs index 6016e381..2c6b19cc 100644 --- a/src/useragent.rs +++ b/src/useragent.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use crate::version; #[allow(dead_code)] diff --git a/src/util.rs b/src/util.rs index 785be68c..29f9c954 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + use anyhow::Result; /// Read a JSON file and deserialize into the specified type. diff --git a/src/version.rs b/src/version.rs index 52db4dce..eed3b368 100644 --- a/src/version.rs +++ b/src/version.rs @@ -1,3 +1,5 @@ +// Code generated by openapi-transformer. DO NOT EDIT. + /// Version is set at build time via env var or defaults to Cargo package version. pub const VERSION: &str = env!("CARGO_PKG_VERSION");