Skip to content

Commit 1cb4016

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e3288dc2 of spec repo (#1195)
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 9431454 commit 1cb4016

9 files changed

+156
-15
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.4",
7-
"regenerated": "2022-10-03 13:35:10.526110",
8-
"spec_repo_commit": "1358b465"
7+
"regenerated": "2022-10-03 19:49:06.653246",
8+
"spec_repo_commit": "e3288dc2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-10-03 13:35:10.538496",
13-
"spec_repo_commit": "1358b465"
12+
"regenerated": "2022-10-03 19:49:06.750886",
13+
"spec_repo_commit": "e3288dc2"
1414
}
1515
}
1616
}

examples/v2/rum/UpdateRUMApplication.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,31 @@
22
Update a RUM application returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
from datadog_api_client.v2.api.rum_api import RUMApi
78
from datadog_api_client.v2.model.rum_application_update import RUMApplicationUpdate
89
from datadog_api_client.v2.model.rum_application_update_attributes import RUMApplicationUpdateAttributes
910
from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest
1011
from datadog_api_client.v2.model.rum_application_update_type import RUMApplicationUpdateType
1112

13+
# there is a valid "rum_application" in the system
14+
RUM_APPLICATION_DATA_ID = environ["RUM_APPLICATION_DATA_ID"]
15+
1216
body = RUMApplicationUpdateRequest(
1317
data=RUMApplicationUpdate(
1418
attributes=RUMApplicationUpdateAttributes(
1519
name="updated_name_for_my_existing_rum_application",
1620
type="browser",
1721
),
18-
id="abcd1234-0000-0000-abcd-1234abcd5678",
22+
id=RUM_APPLICATION_DATA_ID,
1923
type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE,
2024
),
2125
)
2226

2327
configuration = Configuration()
2428
with ApiClient(configuration) as api_client:
2529
api_instance = RUMApi(api_client)
26-
response = api_instance.update_rum_application(id="id", body=body)
30+
response = api_instance.update_rum_application(id=RUM_APPLICATION_DATA_ID, body=body)
2731

2832
print(response)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-10-03T19:34:13.617Z

tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.yaml

Lines changed: 21 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-10-03T19:33:57.521Z
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"name":"test_name_create","type":"browser"},"type":"rum_application_create"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/rum/applications
11+
response:
12+
body:
13+
string: '{"data":{"attributes":{"updated_by_handle":"[email protected]","application_id":"8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4","name":"test_name_create","created_by_handle":"[email protected]","created_at":1664825637704,"org_id":321813,"updated_at":1664825637704,"is_active":false,"hash":"pub1ef487d822e6ce60d082ad0364b29883","type":"browser"},"type":"rum_application","id":"8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4"}}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"data":{"attributes":{"name":"updated_name_for_my_existing_rum_application","type":"browser"},"id":"8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4","type":"rum_application_update"}}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: PATCH
30+
uri: https://api.datadoghq.com/api/v2/rum/applications/8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4
31+
response:
32+
body:
33+
string: '{"data":{"attributes":{"updated_by_handle":"[email protected]","application_id":"8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4","name":"updated_name_for_my_existing_rum_application","created_by_handle":"[email protected]","created_at":1664825637704,"org_id":321813,"updated_at":1664825638467,"is_active":false,"hash":"pub1ef487d822e6ce60d082ad0364b29883","type":"browser"},"type":"rum_application","id":"8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4"}}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 200
41+
message: OK
42+
- request:
43+
body: null
44+
headers:
45+
accept:
46+
- '*/*'
47+
method: DELETE
48+
uri: https://api.datadoghq.com/api/v2/rum/applications/8aeaffbf-12e3-4192-9b71-7f85bb8f2bf4
49+
response:
50+
body:
51+
string: ''
52+
headers: {}
53+
status:
54+
code: 204
55+
message: No Content
56+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-10-03T19:32:50.950Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"name":"test_name_create","type":"browser"},"type":"rum_application_create"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/rum/applications
11+
response:
12+
body:
13+
string: '{"data":{"attributes":{"updated_by_handle":"[email protected]","application_id":"296a7eed-c8e3-480d-b3f1-0777555d6005","name":"test_name_create","created_by_handle":"[email protected]","created_at":1664825571864,"org_id":321813,"updated_at":1664825571864,"is_active":false,"hash":"puba93f53dff0e15bc11416bd06e42c6cd3","type":"browser"},"type":"rum_application","id":"296a7eed-c8e3-480d-b3f1-0777555d6005"}}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"data":{"id":"this_id_will_not_match","type":"rum_application_update"}}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: PATCH
30+
uri: https://api.datadoghq.com/api/v2/rum/applications/296a7eed-c8e3-480d-b3f1-0777555d6005
31+
response:
32+
body:
33+
string: '{"errors":["The id attribute in the request body does not match the
34+
id in the URL"]}'
35+
headers:
36+
content-type:
37+
- application/json
38+
status:
39+
code: 422
40+
message: Unprocessable Entity
41+
- request:
42+
body: null
43+
headers:
44+
accept:
45+
- '*/*'
46+
method: DELETE
47+
uri: https://api.datadoghq.com/api/v2/rum/applications/296a7eed-c8e3-480d-b3f1-0777555d6005
48+
response:
49+
body:
50+
string: ''
51+
headers: {}
52+
status:
53+
code: 204
54+
message: No Content
55+
version: 1

tests/v2/features/rum.feature

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Feature: RUM
9191
When the request is sent
9292
Then the response status is 404 Not Found
9393

94-
@generated @skip @team:DataDog/rum-back
94+
@team:DataDog/rum-back
9595
Scenario: List all the RUM applications returns "OK" response
9696
Given new "GetRUMApplications" request
9797
When the request is sent
@@ -135,18 +135,20 @@ Feature: RUM
135135
When the request is sent
136136
Then the response status is 404 Not Found
137137

138-
@generated @skip @team:DataDog/rum-back
138+
@team:DataDog/rum-back
139139
Scenario: Update a RUM application returns "OK" response
140-
Given new "UpdateRUMApplication" request
141-
And request contains "id" parameter from "REPLACE.ME"
142-
And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
140+
Given there is a valid "rum_application" in the system
141+
And new "UpdateRUMApplication" request
142+
And request contains "id" parameter from "rum_application.data.id"
143+
And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "{{ rum_application.data.id }}","type": "rum_application_update"}}
143144
When the request is sent
144145
Then the response status is 200 OK
145146

146-
@generated @skip @team:DataDog/rum-back
147+
@team:DataDog/rum-back
147148
Scenario: Update a RUM application returns "Unprocessable Entity." response
148-
Given new "UpdateRUMApplication" request
149-
And request contains "id" parameter from "REPLACE.ME"
150-
And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}}
149+
Given there is a valid "rum_application" in the system
150+
And new "UpdateRUMApplication" request
151+
And request contains "id" parameter from "rum_application.data.id"
152+
And body with value {"data": {"id": "this_id_will_not_match", "type": "rum_application_update"}}
151153
When the request is sent
152154
Then the response status is 422 Unprocessable Entity.

0 commit comments

Comments
 (0)