diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fa9ffba1574..685e6771f05 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -166732,6 +166732,14 @@ paths: $ref: "#/components/responses/ForbiddenResponse" "404": $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "412": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Precondition Failed "429": $ref: "#/components/responses/TooManyRequestsResponse" "500": @@ -166846,6 +166854,14 @@ paths: $ref: "#/components/responses/ForbiddenResponse" "404": $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "412": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Precondition Failed "429": $ref: "#/components/responses/TooManyRequestsResponse" "500": diff --git a/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java b/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java index b195f13a0f6..142ec9f3fe9 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java @@ -504,6 +504,8 @@ public CompletableFuture deleteRowsAsync(String id, BatchDeleteRowsRequest * 400 Bad Request - * 403 Forbidden - * 404 Not Found - + * 409 Conflict - + * 412 Precondition Failed - * 429 Too many requests - * 500 Internal Server Error - * @@ -1710,6 +1712,8 @@ public CompletableFuture upsertRowsAsync(String id, BatchUpsertRowsRequest * 400 Bad Request - * 403 Forbidden - * 404 Not Found - + * 409 Conflict - + * 412 Precondition Failed - * 429 Too many requests - * 500 Internal Server Error - * diff --git a/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature b/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature index 859f70c13ec..7e0b9630705 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature @@ -82,6 +82,14 @@ Feature: Reference Tables When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete rows returns "Conflict" response + Given new "DeleteRows" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": [{"id": "primary_key_value", "type": "row"}]} + When the request is sent + Then the response status is 409 Conflict + @generated @skip @team:DataDog/redapl-experiences Scenario: Delete rows returns "Not Found" response Given new "DeleteRows" request @@ -90,6 +98,14 @@ Feature: Reference Tables When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete rows returns "Precondition Failed" response + Given new "DeleteRows" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": [{"id": "primary_key_value", "type": "row"}]} + When the request is sent + Then the response status is 412 Precondition Failed + @generated @skip @team:DataDog/redapl-experiences Scenario: Delete rows returns "Rows deleted successfully" response Given new "DeleteRows" request @@ -208,6 +224,14 @@ Feature: Reference Tables When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:DataDog/redapl-experiences + Scenario: Upsert rows returns "Conflict" response + Given new "UpsertRows" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"values": {}}, "id": "primary_key_value", "type": "row"}]} + When the request is sent + Then the response status is 409 Conflict + @generated @skip @team:DataDog/redapl-experiences Scenario: Upsert rows returns "Not Found" response Given new "UpsertRows" request @@ -216,6 +240,14 @@ Feature: Reference Tables When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/redapl-experiences + Scenario: Upsert rows returns "Precondition Failed" response + Given new "UpsertRows" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"values": {}}, "id": "primary_key_value", "type": "row"}]} + When the request is sent + Then the response status is 412 Precondition Failed + @generated @skip @team:DataDog/redapl-experiences Scenario: Upsert rows returns "Rows created or updated successfully" response Given new "UpsertRows" request