Skip to content

Commit a0a407f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add 409 Conflict to CreateGlobalVariable (#1712)
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 3151550 commit a0a407f

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
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-07-26 15:05:51.328066",
8-
"spec_repo_commit": "bdcf730e"
7+
"regenerated": "2024-07-26 17:48:02.760477",
8+
"spec_repo_commit": "187cfa14"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-26 15:05:51.346617",
13-
"spec_repo_commit": "bdcf730e"
12+
"regenerated": "2024-07-26 17:48:02.779602",
13+
"spec_repo_commit": "187cfa14"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31092,6 +31092,12 @@ paths:
3109231092
schema:
3109331093
$ref: '#/components/schemas/APIErrorResponse'
3109431094
description: Forbidden
31095+
'409':
31096+
content:
31097+
application/json:
31098+
schema:
31099+
$ref: '#/components/schemas/APIErrorResponse'
31100+
description: Conflict
3109531101
'429':
3109631102
$ref: '#/components/responses/TooManyRequestsResponse'
3109731103
security:

features/v1/synthetics.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ Feature: Synthetics
8686
Then the response status is 200 OK
8787
And the response "name" is equal to "GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}"
8888

89+
@generated @skip @team:DataDog/synthetics-ct
90+
Scenario: Create a global variable returns "Conflict" response
91+
Given new "CreateGlobalVariable" request
92+
And body with value {"attributes": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "description": "Example description", "name": "MY_VARIABLE", "parse_test_options": {"field": "content-type", "localVariableName": "LOCAL_VARIABLE", "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}, "parse_test_public_id": "abc-def-123", "tags": ["team:front", "test:workflow-1"], "value": {"secure": true, "value": "value"}}
93+
When the request is sent
94+
Then the response status is 409 Conflict
95+
8996
@generated @skip @team:DataDog/synthetics-ct
9097
Scenario: Create a global variable returns "Invalid request" response
9198
Given new "CreateGlobalVariable" request

packages/datadog-api-client-v1/apis/SyntheticsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ export class SyntheticsApiResponseProcessor {
12541254
if (
12551255
response.httpStatusCode === 400 ||
12561256
response.httpStatusCode === 403 ||
1257+
response.httpStatusCode === 409 ||
12571258
response.httpStatusCode === 429
12581259
) {
12591260
const bodyText = ObjectSerializer.parse(

0 commit comments

Comments
 (0)