Skip to content

Commit 806a5a0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Document 409 and 412 error codes for UpsertRows/DeleteRows (#1839)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 349556a commit 806a5a0

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166732,6 +166732,14 @@ paths:
166732166732
$ref: "#/components/responses/ForbiddenResponse"
166733166733
"404":
166734166734
$ref: "#/components/responses/NotFoundResponse"
166735+
"409":
166736+
$ref: "#/components/responses/ConflictResponse"
166737+
"412":
166738+
content:
166739+
application/json:
166740+
schema:
166741+
$ref: "#/components/schemas/APIErrorResponse"
166742+
description: Precondition Failed
166735166743
"429":
166736166744
$ref: "#/components/responses/TooManyRequestsResponse"
166737166745
"500":
@@ -166846,6 +166854,14 @@ paths:
166846166854
$ref: "#/components/responses/ForbiddenResponse"
166847166855
"404":
166848166856
$ref: "#/components/responses/NotFoundResponse"
166857+
"409":
166858+
$ref: "#/components/responses/ConflictResponse"
166859+
"412":
166860+
content:
166861+
application/json:
166862+
schema:
166863+
$ref: "#/components/schemas/APIErrorResponse"
166864+
description: Precondition Failed
166849166865
"429":
166850166866
$ref: "#/components/responses/TooManyRequestsResponse"
166851166867
"500":

tests/scenarios/features/v2/reference_tables.feature

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ Feature: Reference Tables
8282
When the request is sent
8383
Then the response status is 400 Bad Request
8484

85+
@generated @skip @team:DataDog/redapl-experiences
86+
Scenario: Delete rows returns "Conflict" response
87+
Given new "DeleteRows" request
88+
And request contains "id" parameter from "REPLACE.ME"
89+
And body with value {"data": [{"id": "primary_key_value", "type": "row"}]}
90+
When the request is sent
91+
Then the response status is 409 Conflict
92+
8593
@generated @skip @team:DataDog/redapl-experiences
8694
Scenario: Delete rows returns "Not Found" response
8795
Given new "DeleteRows" request
@@ -90,6 +98,14 @@ Feature: Reference Tables
9098
When the request is sent
9199
Then the response status is 404 Not Found
92100

101+
@generated @skip @team:DataDog/redapl-experiences
102+
Scenario: Delete rows returns "Precondition Failed" response
103+
Given new "DeleteRows" request
104+
And request contains "id" parameter from "REPLACE.ME"
105+
And body with value {"data": [{"id": "primary_key_value", "type": "row"}]}
106+
When the request is sent
107+
Then the response status is 412 Precondition Failed
108+
93109
@generated @skip @team:DataDog/redapl-experiences
94110
Scenario: Delete rows returns "Rows deleted successfully" response
95111
Given new "DeleteRows" request
@@ -208,6 +224,14 @@ Feature: Reference Tables
208224
When the request is sent
209225
Then the response status is 400 Bad Request
210226

227+
@generated @skip @team:DataDog/redapl-experiences
228+
Scenario: Upsert rows returns "Conflict" response
229+
Given new "UpsertRows" request
230+
And request contains "id" parameter from "REPLACE.ME"
231+
And body with value {"data": [{"attributes": {"values": {}}, "id": "primary_key_value", "type": "row"}]}
232+
When the request is sent
233+
Then the response status is 409 Conflict
234+
211235
@generated @skip @team:DataDog/redapl-experiences
212236
Scenario: Upsert rows returns "Not Found" response
213237
Given new "UpsertRows" request
@@ -216,6 +240,14 @@ Feature: Reference Tables
216240
When the request is sent
217241
Then the response status is 404 Not Found
218242

243+
@generated @skip @team:DataDog/redapl-experiences
244+
Scenario: Upsert rows returns "Precondition Failed" response
245+
Given new "UpsertRows" request
246+
And request contains "id" parameter from "REPLACE.ME"
247+
And body with value {"data": [{"attributes": {"values": {}}, "id": "primary_key_value", "type": "row"}]}
248+
When the request is sent
249+
Then the response status is 412 Precondition Failed
250+
219251
@generated @skip @team:DataDog/redapl-experiences
220252
Scenario: Upsert rows returns "Rows created or updated successfully" response
221253
Given new "UpsertRows" request

0 commit comments

Comments
 (0)