Skip to content

Commit 560f223

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 614e4a4 of spec repo
1 parent 6ecd838 commit 560f223

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7075,15 +7075,17 @@ components:
70757075
BatchUpsertRowsRequestDataAttributes:
70767076
description: Attributes containing row data values for row creation or update
70777077
operations.
7078+
example:
7079+
values:
7080+
age: 25
7081+
example_key_value: primary_key_value
7082+
name: row_name
70787083
properties:
70797084
values:
7080-
additionalProperties:
7081-
x-required-field: true
7082-
description: Key-value pairs representing row data, where keys are field
7083-
names from the schema.
7084-
example:
7085-
example_key_value: primary_key_value
7086-
name: row_name
7085+
additionalProperties: {}
7086+
description: Key-value pairs representing row data, where keys are schema
7087+
field names and values match the corresponding column types. Values can
7088+
be strings or integers.
70877089
type: object
70887090
required:
70897091
- values

examples/v2/reference-tables/UpsertRows.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
data=[
1414
BatchUpsertRowsRequestData(
1515
attributes=BatchUpsertRowsRequestDataAttributes(
16-
values=dict(
17-
example_key_value="primary_key_value",
18-
name="row_name",
19-
),
16+
values=dict([("age", "25"), ("example_key_value", "primary_key_value"), ("name", "row_name")]),
2017
),
2118
id="primary_key_value",
2219
type=TableRowResourceDataType.ROW,

src/datadog_api_client/v2/model/batch_upsert_rows_request_data_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self_, values: Dict[str, Any], **kwargs):
4545
"""
4646
Attributes containing row data values for row creation or update operations.
4747
48-
:param values: Key-value pairs representing row data, where keys are field names from the schema.
48+
:param values: Key-value pairs representing row data, where keys are schema field names and values match the corresponding column types. Values can be strings or integers.
4949
:type values: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}
5050
"""
5151
super().__init__(kwargs)

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)