Skip to content

Commit

Permalink
Regenerate client from commit b01f90f4 of spec repo (#2682)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Jan 31, 2025
1 parent 3a1151d commit bae66d5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 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-30 13:13:45.639832",
"spec_repo_commit": "833109b8"
"regenerated": "2025-01-31 15:03:13.227560",
"spec_repo_commit": "b01f90f4"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-30 13:13:45.655185",
"spec_repo_commit": "833109b8"
"regenerated": "2025-01-31 15:03:13.242731",
"spec_repo_commit": "b01f90f4"
}
}
}
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 examples/v2/events/CreateEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static void main(String[] args) {
"{'datacenter': 'devcycle.us1.prod'}")))))
.category(EventCategory.CHANGE)
.message("payment_processed feature flag has been enabled")
.tags(Collections.singletonList("environment:test"))
.tags(Collections.singletonList("env:test"))
.title("payment_processed feature flag updated"))
.type(EventCreateRequestType.EVENT));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ public ChangeEventCustomAttributes changedResource(
}

/**
* Object representing a uniquely identified resource. Only the resource type <code>feature_flag
* </code> is supported.
* Object representing a uniquely identified resource.
*
* @return changedResource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
import java.util.Map;
import java.util.Objects;

/**
* Object representing a uniquely identified resource. Only the resource type <code>feature_flag
* </code> is supported.
*/
/** Object representing a uniquely identified resource. */
@JsonPropertyOrder({
ChangeEventCustomAttributesChangedResource.JSON_PROPERTY_NAME,
ChangeEventCustomAttributesChangedResource.JSON_PROPERTY_TYPE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
public class ChangeEventCustomAttributesChangedResourceType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("feature_flag"));
new HashSet<String>(Arrays.asList("feature_flag", "configuration"));

public static final ChangeEventCustomAttributesChangedResourceType FEATURE_FLAG =
new ChangeEventCustomAttributesChangedResourceType("feature_flag");
public static final ChangeEventCustomAttributesChangedResourceType CONFIGURATION =
new ChangeEventCustomAttributesChangedResourceType("configuration");

ChangeEventCustomAttributesChangedResourceType(String value) {
super(value, allowedValues);
Expand Down
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": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "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": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "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": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "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": "[email protected]", "type": "user"}, "change_metadata": {"dd": {"team": "datadog_team", "user_email": "[email protected]", "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 bae66d5

Please sign in to comment.