Skip to content

Commit 1b2e3ad

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Mark unit as nullable (#1934)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 1492e04 commit 1b2e3ad

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-03-29 13:20:53.074130",
8-
"spec_repo_commit": "3e55ad68"
7+
"regenerated": "2024-04-01 14:26:12.696945",
8+
"spec_repo_commit": "286f4535"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-03-29 13:20:53.091199",
13-
"spec_repo_commit": "3e55ad68"
12+
"regenerated": "2024-04-01 14:26:12.713850",
13+
"spec_repo_commit": "286f4535"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21742,6 +21742,7 @@ components:
2174221742
If the second element is not present, the API returns null.'
2174321743
items:
2174421744
$ref: '#/components/schemas/Unit'
21745+
nullable: true
2174521746
type: array
2174621747
type: object
2174721748
TimeseriesResponseSeriesList:

examples/v2/metrics/QueryTimeseriesData_301142940.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
[
3434
MetricsTimeseriesQuery(
3535
data_source=MetricsDataSource.METRICS,
36-
query="avg:system.cpu.user{*}",
36+
query="avg:datadog.estimated_usage.metrics.custom{*}",
3737
name="a",
3838
),
3939
]

src/datadog_api_client/v2/model/timeseries_response_series.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def openapi_types(_):
3434
return {
3535
"group_tags": (GroupTags,),
3636
"query_index": (int,),
37-
"unit": ([Unit, none_type],),
37+
"unit": ([Unit, none_type], none_type),
3838
}
3939

4040
attribute_map = {
@@ -47,7 +47,7 @@ def __init__(
4747
self_,
4848
group_tags: Union[GroupTags, UnsetType] = unset,
4949
query_index: Union[int, UnsetType] = unset,
50-
unit: Union[List[Unit], UnsetType] = unset,
50+
unit: Union[List[Unit], none_type, UnsetType] = unset,
5151
**kwargs,
5252
):
5353
"""
@@ -63,7 +63,7 @@ def __init__(
6363
The first element describes the "primary unit" (for example, ``bytes`` in ``bytes per second`` ).
6464
The second element describes the "per unit" (for example, ``second`` in ``bytes per second`` ).
6565
If the second element is not present, the API returns null.
66-
:type unit: [Unit, none_type], optional
66+
:type unit: [Unit, none_type], none_type, optional
6767
"""
6868
if group_tags is not unset:
6969
kwargs["group_tags"] = group_tags
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-03-25T19:28:01.413Z
1+
2024-04-01T14:20:01.994Z

tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_returns_ok_response.yaml

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

tests/v2/features/metrics.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,10 @@ Feature: Metrics
385385
Given a valid "appKeyAuth" key in the system
386386
And operation "QueryTimeseriesData" enabled
387387
And new "QueryTimeseriesData" request
388-
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
388+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
389389
When the request is sent
390390
Then the response status is 200 OK
391391
And the response "data.type" is equal to "timeseries_response"
392-
And the response "data.attributes.series[0].unit[0].name" is equal to "percent"
393392

394393
@generated @skip @team:DataDog/metrics-experience
395394
Scenario: Update a tag configuration returns "Bad Request" response

0 commit comments

Comments
 (0)