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
177 changes: 162 additions & 15 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26598,6 +26598,10 @@ components:
description: Indicates whether this feature flag requires approval for changes.
example: false
type: boolean
staleness_status:
description: Indicates the whether a feature flag is stale or not.
example: "ACTIVE"
type: string
tags:
description: Tags associated with the feature flag.
example: []
Expand Down Expand Up @@ -26681,24 +26685,171 @@ components:
description: Indicates whether feature flag changes require approval in this environment.
example: false
type: boolean
rollout_percentage:
description: Rollout percentage for this environment.
example: 0
format: int64
maximum: 100
minimum: 0
type: integer
rules:
description: Environment targeting rules for this feature flag.
status:
$ref: "#/components/schemas/FeatureFlagStatus"
required:
- environment_id
- status
type: object
FeatureFlagEnvironmentListItem:
description: Environment-specific settings for a feature flag in list responses.
properties:
default_allocation_key:
description: The allocation key used for the default variant.
example: "allocation-default-123abc"
type: string
default_variant_id:
description: The ID of the default variant for this environment.
example: "550e8400-e29b-41d4-a716-446655440002"
nullable: true
type: string
environment_id:
description: The ID of the environment.
example: "550e8400-e29b-41d4-a716-446655440001"
format: uuid
type: string
environment_name:
description: The name of the environment.
example: "env-search-term"
type: string
environment_queries:
description: Queries that target this environment.
example:
- "test-feature-flag"
- "env-search-term"
items:
$ref: "#/components/schemas/FeatureFlagTargetingRule"
description: A query string targeting the environment.
type: string
type: array
is_production:
description: Indicates whether the environment is production.
example: false
type: boolean
override_allocation_key:
description: The allocation key used for the override variant.
example: "allocation-override-123abc"
type: string
override_variant_id:
description: The ID of the override variant for this environment.
example: "550e8400-e29b-41d4-a716-446655440003"
nullable: true
type: string
pending_suggestion_id:
description: Pending suggestion identifier, if approval is required.
example: "550e8400-e29b-41d4-a716-446655440099"
nullable: true
type: string
require_feature_flag_approval:
description: Indicates whether feature flag changes require approval in this environment.
example: false
type: boolean
status:
$ref: "#/components/schemas/FeatureFlagStatus"
required:
- environment_id
- status
type: object
FeatureFlagListItem:
description: A feature flag resource for list responses.
properties:
attributes:
$ref: "#/components/schemas/FeatureFlagListItemAttributes"
id:
description: The unique identifier of the feature flag.
example: "550e8400-e29b-41d4-a716-446655440000"
format: uuid
type: string
type:
$ref: "#/components/schemas/CreateFeatureFlagDataType"
required:
- id
- type
- attributes
type: object
FeatureFlagListItemAttributes:
description: Attributes of a feature flag in list responses.
properties:
archived_at:
description: The timestamp when the feature flag was archived.
example: "2023-01-01T00:00:00Z"
format: date-time
nullable: true
type: string
created_at:
description: The timestamp when the feature flag was created.
example: "2023-01-01T00:00:00Z"
format: date-time
type: string
created_by:
description: The ID of the user who created the feature flag.
example: "550e8400-e29b-41d4-a716-446655440010"
format: uuid
type: string
description:
description: The description of the feature flag.
example: "This is an example feature flag for demonstration"
type: string
distribution_channel:
description: Distribution channel for the feature flag.
example: "ALL"
type: string
feature_flag_environments:
description: Environment-specific settings for the feature flag.
items:
$ref: "#/components/schemas/FeatureFlagEnvironmentListItem"
type: array
json_schema:
description: JSON schema for validation when value_type is JSON.
example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}'
nullable: true
type: string
key:
description: The unique key of the feature flag.
example: "feature-flag-abc123"
type: string
last_updated_by:
description: The ID of the user who last updated the feature flag.
example: "550e8400-e29b-41d4-a716-446655440010"
format: uuid
type: string
name:
description: The name of the feature flag.
example: "Feature Flag ABC123"
type: string
require_approval:
description: Indicates whether this feature flag requires approval for changes.
example: false
type: boolean
staleness_status:
description: Indicates the staleness status of the feature flag.
example: "ACTIVE"
type: string
tags:
description: Tags associated with the feature flag.
example: []
items:
description: A tag associated with the feature flag.
type: string
type: array
updated_at:
description: The timestamp when the feature flag was last updated.
example: "2023-01-01T00:00:00Z"
format: date-time
type: string
value_type:
$ref: "#/components/schemas/ValueType"
variants:
description: The variants of the feature flag.
items:
$ref: "#/components/schemas/Variant"
type: array
required:
- key
- name
- description
- value_type
- variants
type: object
FeatureFlagResponse:
description: Response containing a feature flag.
properties:
Expand All @@ -26717,10 +26868,6 @@ components:
x-enum-varnames:
- ENABLED
- DISABLED
FeatureFlagTargetingRule:
additionalProperties: {}
description: A targeting rule for a feature flag.
type: object
FeatureFlagsPaginationMeta:
description: Pagination metadata for feature flags.
properties:
Expand Down Expand Up @@ -40561,7 +40708,7 @@ components:
data:
description: List of feature flags.
items:
$ref: "#/components/schemas/FeatureFlag"
$ref: "#/components/schemas/FeatureFlagListItem"
type: array
meta:
$ref: "#/components/schemas/FeatureFlagsPaginationMeta"
Expand Down
4 changes: 3 additions & 1 deletion examples/v2/feature-flags/ListFeatureFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.FeatureFlagsApi;
import com.datadog.api.client.v2.api.FeatureFlagsApi.ListFeatureFlagsOptionalParameters;
import com.datadog.api.client.v2.model.ListFeatureFlagsResponse;

public class Example {
Expand All @@ -11,7 +12,8 @@ public static void main(String[] args) {
FeatureFlagsApi apiInstance = new FeatureFlagsApi(defaultClient);

try {
ListFeatureFlagsResponse result = apiInstance.listFeatureFlags();
ListFeatureFlagsResponse result =
apiInstance.listFeatureFlags(new ListFeatureFlagsOptionalParameters().limit(10));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureFlagsApi#listFeatureFlags");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
FeatureFlagAttributes.JSON_PROPERTY_LAST_UPDATED_BY,
FeatureFlagAttributes.JSON_PROPERTY_NAME,
FeatureFlagAttributes.JSON_PROPERTY_REQUIRE_APPROVAL,
FeatureFlagAttributes.JSON_PROPERTY_STALENESS_STATUS,
FeatureFlagAttributes.JSON_PROPERTY_TAGS,
FeatureFlagAttributes.JSON_PROPERTY_UPDATED_AT,
FeatureFlagAttributes.JSON_PROPERTY_VALUE_TYPE,
Expand Down Expand Up @@ -77,6 +78,9 @@ public class FeatureFlagAttributes {
public static final String JSON_PROPERTY_REQUIRE_APPROVAL = "require_approval";
private Boolean requireApproval;

public static final String JSON_PROPERTY_STALENESS_STATUS = "staleness_status";
private String stalenessStatus;

public static final String JSON_PROPERTY_TAGS = "tags";
private List<String> tags = null;

Expand Down Expand Up @@ -368,6 +372,27 @@ public void setRequireApproval(Boolean requireApproval) {
this.requireApproval = requireApproval;
}

public FeatureFlagAttributes stalenessStatus(String stalenessStatus) {
this.stalenessStatus = stalenessStatus;
return this;
}

/**
* Indicates the whether a feature flag is stale or not.
*
* @return stalenessStatus
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STALENESS_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStalenessStatus() {
return stalenessStatus;
}

public void setStalenessStatus(String stalenessStatus) {
this.stalenessStatus = stalenessStatus;
}

public FeatureFlagAttributes tags(List<String> tags) {
this.tags = tags;
return this;
Expand Down Expand Up @@ -539,6 +564,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.lastUpdatedBy, featureFlagAttributes.lastUpdatedBy)
&& Objects.equals(this.name, featureFlagAttributes.name)
&& Objects.equals(this.requireApproval, featureFlagAttributes.requireApproval)
&& Objects.equals(this.stalenessStatus, featureFlagAttributes.stalenessStatus)
&& Objects.equals(this.tags, featureFlagAttributes.tags)
&& Objects.equals(this.updatedAt, featureFlagAttributes.updatedAt)
&& Objects.equals(this.valueType, featureFlagAttributes.valueType)
Expand All @@ -560,6 +586,7 @@ public int hashCode() {
lastUpdatedBy,
name,
requireApproval,
stalenessStatus,
tags,
updatedAt,
valueType,
Expand All @@ -586,6 +613,7 @@ public String toString() {
sb.append(" lastUpdatedBy: ").append(toIndentedString(lastUpdatedBy)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" requireApproval: ").append(toIndentedString(requireApproval)).append("\n");
sb.append(" stalenessStatus: ").append(toIndentedString(stalenessStatus)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n");
Expand Down
Loading
Loading