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 a4bc820 commit ced4cb0
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 15 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:52.778358",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 20:51:12.351538",
"spec_repo_commit": "7749185c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-29 14:55:52.793962",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 20:51:12.366193",
"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 examples/v2/events/CreateEvent.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
category=EventCategory.CHANGE,
message="payment_processed feature flag has been enabled",
tags=[
"environment:test",
"env:test",
],
title="payment_processed feature flag updated",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(
:param change_metadata: Free form object with information related to the ``change`` event. Can be arbitrarily nested and contain any valid JSON.
:type change_metadata: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
:param changed_resource: Object representing a uniquely identified resource. Only the resource type ``feature_flag`` is supported.
:param changed_resource: Object representing a uniquely identified resource.
:type changed_resource: ChangeEventCustomAttributesChangedResource
:param impacted_resources: A list of resources impacted by this change. It is recommended to provide an impacted resource to display
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def openapi_types(_):

def __init__(self_, name: str, type: ChangeEventCustomAttributesChangedResourceType, **kwargs):
"""
Object representing a uniquely identified resource. Only the resource type ``feature_flag`` is supported.
Object representing a uniquely identified resource.
:param name: Resource's name.
:type name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ class ChangeEventCustomAttributesChangedResourceType(ModelSimple):
"""
Resource's type.
:param value: If omitted defaults to "feature_flag". Must be one of ["feature_flag"].
:param value: Must be one of ["feature_flag", "configuration"].
:type value: str
"""

allowed_values = {
"feature_flag",
"configuration",
}
FEATURE_FLAG: ClassVar["ChangeEventCustomAttributesChangedResourceType"]
CONFIGURATION: ClassVar["ChangeEventCustomAttributesChangedResourceType"]

@cached_property
def openapi_types(_):
Expand All @@ -35,3 +37,6 @@ def openapi_types(_):
ChangeEventCustomAttributesChangedResourceType.FEATURE_FLAG = ChangeEventCustomAttributesChangedResourceType(
"feature_flag"
)
ChangeEventCustomAttributesChangedResourceType.CONFIGURATION = ChangeEventCustomAttributesChangedResourceType(
"configuration"
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, **kwargs):
:param change_metadata: Free form object with information related to the `change` event. Can be arbitrarily nested and contain any valid JSON.
:type change_metadata: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
:param changed_resource: Object representing a uniquely identified resource. Only the resource type `feature_flag` is supported.
:param changed_resource: Object representing a uniquely identified resource.
:type changed_resource: ChangeEventCustomAttributesChangedResource
:param impacted_resources: A list of resources impacted by this change. It is recommended to provide an impacted resource to display
Expand Down
4 changes: 2 additions & 2 deletions tests/v2/features/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": "[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 ced4cb0

Please sign in to comment.