Skip to content
Closed
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
19 changes: 19 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120748,6 +120748,19 @@ components:
description: The name of the feature flag.
example: "Updated Feature Flag XYZ789"
type: string
tags:
description: |-
Tags associated with the feature flag. This field replaces the full set of
existing tags; omit it to leave tags unchanged, or pass an empty array to
clear all tags. The owning team is set by including a tag of the form
`team:<team-handle>` in this array.
example: ["team:feature-flagging"]
items:
description: A tag associated with the feature flag.
maxLength: 200
type: string
maxItems: 100
type: array
type: object
UpdateFeatureFlagData:
description: Data for updating a feature flag.
Expand Down Expand Up @@ -149224,6 +149237,11 @@ paths:
description: |-
Updates an existing feature flag's metadata such as
name and description. Does not modify targeting rules or allocations.

To change the owning team, update `tags` and include a tag of the form
`team:<team-handle>` in the array. `tags` is a full replacement of the
existing tag set (including any `team:` tag), so include every tag you
want to keep, not just the ones you're adding.
operationId: UpdateFeatureFlag
parameters:
- $ref: "#/components/parameters/feature_flag_id"
Expand All @@ -149238,6 +149256,7 @@ paths:
description: Updated description for the feature flag
enabled: true
name: Updated Feature Flag XYZ789
tags: ["team:feature-flagging"]
type: feature-flags
schema:
$ref: "#/components/schemas/UpdateFeatureFlagRequest"
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v2/api/feature_flags_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,11 @@ def update_feature_flag(feature_flag_id, body, opts = {})
# Updates an existing feature flag's metadata such as
# name and description. Does not modify targeting rules or allocations.
#
# To change the owning team, update `tags` and include a tag of the form
# `team:<team-handle>` in the array. `tags` is a full replacement of the
# existing tag set (including any `team:` tag), so include every tag you
# want to keep, not just the ones you're adding.
#
# @param feature_flag_id [UUID] The ID of the feature flag.
# @param body [UpdateFeatureFlagRequest]
# @param opts [Hash] the optional parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class UpdateFeatureFlagAttributes
# The name of the feature flag.
attr_accessor :name

# Tags associated with the feature flag. This field replaces the full set of
# existing tags; omit it to leave tags unchanged, or pass an empty array to
# clear all tags. The owning team is set by including a tag of the form
# `team:<team-handle>` in this array.
attr_reader :tags

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -38,7 +44,8 @@ def self.attribute_map
{
:'description' => :'description',
:'json_schema' => :'json_schema',
:'name' => :'name'
:'name' => :'name',
:'tags' => :'tags'
}
end

Expand All @@ -48,7 +55,8 @@ def self.openapi_types
{
:'description' => :'String',
:'json_schema' => :'String',
:'name' => :'String'
:'name' => :'String',
:'tags' => :'Array<String>'
}
end

Expand Down Expand Up @@ -89,6 +97,30 @@ def initialize(attributes = {})
if attributes.key?(:'name')
self.name = attributes[:'name']
end

if attributes.key?(:'tags')
if (value = attributes[:'tags']).is_a?(Array)
self.tags = value
end
end
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
# @!visibility private
def valid?
return false if !@tags.nil? && @tags.length > 100
true
end

# Custom attribute writer method with validation
# @param tags [Object] Object to be assigned
# @!visibility private
def tags=(tags)
if !tags.nil? && tags.length > 100
fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 100.'
end
@tags = tags
end

# Returns the object in the form of hash, with additionalProperties support.
Expand Down Expand Up @@ -120,14 +152,15 @@ def ==(o)
description == o.description &&
json_schema == o.json_schema &&
name == o.name &&
tags == o.tags &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[description, json_schema, name, additional_properties].hash
[description, json_schema, name, tags, additional_properties].hash
end
end
end
Loading