Skip to content

Commit

Permalink
Regenerate client from commit 7749185c of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 30, 2025
1 parent cb2d556 commit 11851ed
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-29 14:55:54.541634",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 20:51:05.655315",
"spec_repo_commit": "7749185c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-29 14:55:54.557559",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 20:51:05.670877",
"spec_repo_commit": "7749185c"
}
}
}
9 changes: 5 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5363,8 +5363,7 @@ components:
- USER
- SYSTEM
ChangeEventCustomAttributesChangedResource:
description: Object representing a uniquely identified resource. Only the resource
type `feature_flag` is supported.
description: Object representing a uniquely identified resource.
properties:
name:
description: Resource's name.
Expand All @@ -5380,10 +5379,12 @@ components:
description: Resource's type.
enum:
- feature_flag
- configuration
example: feature_flag
type: string
x-enum-varnames:
- FEATURE_FLAG
- CONFIGURATION
ChangeEventCustomAttributesImpactedResourcesItems:
description: Object representing a uniquely identified resource. Only the resource
type `service` is supported.
Expand Down Expand Up @@ -11239,7 +11240,7 @@ components:

Refer to [Tags docs](https://docs.datadoghq.com/getting_started/tagging/).'
example:
- environment:test
- env:test
items:
description: A tag.
type: string
Expand Down Expand Up @@ -35963,7 +35964,7 @@ paths:
category: change
message: payment_processed feature flag has been enabled
tags:
- environment:test
- env:test
title: payment_processed feature flag updated
type: event
schema:
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_change_event_custom_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ChangeEventCustomAttributes struct {
Author *ChangeEventCustomAttributesAuthor `json:"author,omitempty"`
// Free form object with information related to the `change` event. Can be arbitrarily nested and contain any valid JSON.
ChangeMetadata map[string]interface{} `json:"change_metadata,omitempty"`
// Object representing a uniquely identified resource. Only the resource type `feature_flag` is supported.
// Object representing a uniquely identified resource.
ChangedResource ChangeEventCustomAttributesChangedResource `json:"changed_resource"`
// A list of resources impacted by this change. It is recommended to provide an impacted resource to display
// the change event at the right location. Only resources of type `service` are supported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// ChangeEventCustomAttributesChangedResource Object representing a uniquely identified resource. Only the resource type `feature_flag` is supported.
// ChangeEventCustomAttributesChangedResource Object representing a uniquely identified resource.
type ChangeEventCustomAttributesChangedResource struct {
// Resource's name.
Name string `json:"name"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ type ChangeEventCustomAttributesChangedResourceType string

// List of ChangeEventCustomAttributesChangedResourceType.
const (
CHANGEEVENTCUSTOMATTRIBUTESCHANGEDRESOURCETYPE_FEATURE_FLAG ChangeEventCustomAttributesChangedResourceType = "feature_flag"
CHANGEEVENTCUSTOMATTRIBUTESCHANGEDRESOURCETYPE_FEATURE_FLAG ChangeEventCustomAttributesChangedResourceType = "feature_flag"
CHANGEEVENTCUSTOMATTRIBUTESCHANGEDRESOURCETYPE_CONFIGURATION ChangeEventCustomAttributesChangedResourceType = "configuration"
)

var allowedChangeEventCustomAttributesChangedResourceTypeEnumValues = []ChangeEventCustomAttributesChangedResourceType{
CHANGEEVENTCUSTOMATTRIBUTESCHANGEDRESOURCETYPE_FEATURE_FLAG,
CHANGEEVENTCUSTOMATTRIBUTESCHANGEDRESOURCETYPE_CONFIGURATION,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/events/CreateEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
Category: datadogV2.EVENTCATEGORY_CHANGE,
Message: datadog.PtrString("payment_processed feature flag has been enabled"),
Tags: []string{
"environment:test",
"env:test",
},
Title: "payment_processed feature flag updated",
},
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v2/events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ Feature: Events
@generated @skip @team:DataDog/event-management
Scenario: Post an event returns "Bad request" response
Given new "CreateEvent" request
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "datadog@datadog.com", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "datadog@datadog.com", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["environment:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "datadog@datadog.com", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "datadog@datadog.com", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
When the request is sent
Then the response status is 400 Bad request

@generated @skip @team:DataDog/event-management
Scenario: Post an event returns "OK" response
Given new "CreateEvent" request
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "datadog@datadog.com", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "datadog@datadog.com", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["environment:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
And body with value {"data": {"attributes": {"attributes": {"author": {"name": "datadog@datadog.com", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "datadog@datadog.com", "user_id": "datadog_user_id", "user_name": "datadog_username"}, "resource_link": "datadog.com/feature/fallback_payments_test"}, "changed_resource": {"name": "fallback_payments_test", "type": "feature_flag"}, "impacted_resources": [{"name": "payments_api", "type": "service"}], "new_value": {"enabled": true, "percentage": "50%", "rule": {"datacenter": "devcycle.us1.prod"}}, "prev_value": {"enabled": true, "percentage": "10%", "rule": {"datacenter": "devcycle.us1.prod"}}}, "category": "change", "message": "payment_processed feature flag has been enabled", "tags": ["env:test"], "title": "payment_processed feature flag updated"}, "type": "event"}}
When the request is sent
Then the response status is 200 OK

Expand Down

0 comments on commit 11851ed

Please sign in to comment.