Skip to content
Open
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: 7 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137806,7 +137806,7 @@ paths:
get:
description: |-
Returns a list of environments for the organization.
Supports filtering by name and key.
Supports filtering by name, key, and DD_ENV.
operationId: ListFeatureFlagsEnvironments
parameters:
- description: Filter environments by name (partial matching).
Expand All @@ -137821,6 +137821,12 @@ paths:
name: key
schema:
type: string
- description: Filter environments by queries that contain the provided DD_ENV value.
example: "staging"
in: query
name: dd_env
schema:
type: string
- description: Maximum number of results to return.
example: 10
in: query
Expand Down
16 changes: 14 additions & 2 deletions src/datadogV2/api/api_feature_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ pub struct ListFeatureFlagsEnvironmentsOptionalParams {
pub name: Option<String>,
/// Filter environments by key (partial matching).
pub key: Option<String>,
/// Filter environments by queries that contain the provided DD_ENV value.
pub dd_env: Option<String>,
/// Maximum number of results to return.
pub limit: Option<i64>,
/// Number of results to skip.
Expand All @@ -72,6 +74,11 @@ impl ListFeatureFlagsEnvironmentsOptionalParams {
self.key = Some(value);
self
}
/// Filter environments by queries that contain the provided DD_ENV value.
pub fn dd_env(mut self, value: String) -> Self {
self.dd_env = Some(value);
self
}
/// Maximum number of results to return.
pub fn limit(mut self, value: i64) -> Self {
self.limit = Some(value);
Expand Down Expand Up @@ -1829,7 +1836,7 @@ impl FeatureFlagsAPI {
}

/// Returns a list of environments for the organization.
/// Supports filtering by name and key.
/// Supports filtering by name, key, and DD_ENV.
pub async fn list_feature_flags_environments(
&self,
params: ListFeatureFlagsEnvironmentsOptionalParams,
Expand All @@ -1855,7 +1862,7 @@ impl FeatureFlagsAPI {
}

/// Returns a list of environments for the organization.
/// Supports filtering by name and key.
/// Supports filtering by name, key, and DD_ENV.
pub async fn list_feature_flags_environments_with_http_info(
&self,
params: ListFeatureFlagsEnvironmentsOptionalParams,
Expand All @@ -1869,6 +1876,7 @@ impl FeatureFlagsAPI {
// unbox and build optional parameters
let name = params.name;
let key = params.key;
let dd_env = params.dd_env;
let limit = params.limit;
let offset = params.offset;

Expand All @@ -1888,6 +1896,10 @@ impl FeatureFlagsAPI {
if let Some(ref local_query_param) = key {
local_req_builder = local_req_builder.query(&[("key", &local_query_param.to_string())]);
};
if let Some(ref local_query_param) = dd_env {
local_req_builder =
local_req_builder.query(&[("dd_env", &local_query_param.to_string())]);
};
if let Some(ref local_query_param) = limit {
local_req_builder =
local_req_builder.query(&[("limit", &local_query_param.to_string())]);
Expand Down
4 changes: 4 additions & 0 deletions tests/scenarios/function_mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36712,6 +36712,9 @@ fn test_v2_list_feature_flags_environments(
let key = _parameters
.get("key")
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
let dd_env = _parameters
.get("dd_env")
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
let limit = _parameters
.get("limit")
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
Expand All @@ -36722,6 +36725,7 @@ fn test_v2_list_feature_flags_environments(
datadogV2::api_feature_flags::ListFeatureFlagsEnvironmentsOptionalParams::default();
params.name = name;
params.key = key;
params.dd_env = dd_env;
params.limit = limit;
params.offset = offset;
let response = match block_on(api.list_feature_flags_environments_with_http_info(params)) {
Expand Down
Loading