Skip to content

Commit 2ee6d5b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3d20c72 of spec repo
1 parent 2b59847 commit 2ee6d5b

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6971,10 +6971,15 @@ components:
69716971
properties:
69726972
values:
69736973
additionalProperties:
6974-
x-required-field: true
6975-
description: Key-value pairs representing row data, where keys are field
6976-
names from the schema.
6974+
oneOf:
6975+
- type: string
6976+
- format: int32
6977+
maximum: 2147483647
6978+
type: integer
6979+
description: Key-value pairs representing row data, where keys are schema
6980+
field names and values match the corresponding column types.
69776981
example:
6982+
age: 25
69786983
example_key_value: primary_key_value
69796984
name: row_name
69806985
type: object
@@ -67941,6 +67946,7 @@ paths:
6794167946
- us3.datadoghq.com
6794267947
- us5.datadoghq.com
6794367948
- ap1.datadoghq.com
67949+
- ap2.datadoghq.com
6794467950
- datadoghq.eu
6794567951
- ddog-gov.com
6794667952
subdomain:

examples/v2/reference-tables/UpsertRows.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
BatchUpsertRowsRequestData(
1515
attributes=BatchUpsertRowsRequestDataAttributes(
1616
values=dict(
17+
age=25,
1718
example_key_value="primary_key_value",
1819
name="row_name",
1920
),

src/datadog_api_client/v2/api/events_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def __init__(self, api_client=None):
5555
"us3.datadoghq.com",
5656
"us5.datadoghq.com",
5757
"ap1.datadoghq.com",
58+
"ap2.datadoghq.com",
5859
"datadoghq.eu",
5960
"ddog-gov.com",
6061
],

src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Any, Dict
6+
from typing import Dict, Union
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11-
date,
12-
datetime,
13-
none_type,
14-
UUID,
1511
)
1612

1713

@@ -22,16 +18,8 @@ def openapi_types(_):
2218
"values": (
2319
{
2420
str: (
25-
bool,
26-
date,
27-
datetime,
28-
dict,
29-
float,
30-
int,
31-
list,
3221
str,
33-
UUID,
34-
none_type,
22+
int,
3523
)
3624
},
3725
),
@@ -41,12 +29,12 @@ def openapi_types(_):
4129
"values": "values",
4230
}
4331

44-
def __init__(self_, values: Dict[str, Any], **kwargs):
32+
def __init__(self_, values: Dict[str, Union[str, int]], **kwargs):
4533
"""
4634
Attributes containing row data values for row creation or update operations.
4735
48-
:param values: Key-value pairs representing row data, where keys are field names from the schema.
49-
:type values: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}
36+
:param values: Key-value pairs representing row data, where keys are schema field names and values match the corresponding column types.
37+
:type values: {str: (str, int,)}
5038
"""
5139
super().__init__(kwargs)
5240

tests/v2/features/reference_tables.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,22 @@ Feature: Reference Tables
148148
Scenario: Upsert rows returns "Bad Request" response
149149
Given new "UpsertRows" request
150150
And request contains "id" parameter from "REPLACE.ME"
151-
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
151+
And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
152152
When the request is sent
153153
Then the response status is 400 Bad Request
154154

155155
@generated @skip @team:DataDog/redapl-experiences
156156
Scenario: Upsert rows returns "Not Found" response
157157
Given new "UpsertRows" request
158158
And request contains "id" parameter from "REPLACE.ME"
159-
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
159+
And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
160160
When the request is sent
161161
Then the response status is 404 Not Found
162162

163163
@generated @skip @team:DataDog/redapl-experiences
164164
Scenario: Upsert rows returns "Rows created or updated successfully" response
165165
Given new "UpsertRows" request
166166
And request contains "id" parameter from "REPLACE.ME"
167-
And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
167+
And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]}
168168
When the request is sent
169169
Then the response status is 200 Rows created or updated successfully

0 commit comments

Comments
 (0)