Skip to content

Commit 8cad1e8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7ca677d6 of spec repo
1 parent a0011ea commit 8cad1e8

File tree

12 files changed

+274
-17
lines changed

12 files changed

+274
-17
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.5",
7-
"regenerated": "2023-07-10 17:45:27.823253",
8-
"spec_repo_commit": "9e0b471a"
7+
"regenerated": "2023-07-11 14:36:39.086601",
8+
"spec_repo_commit": "7ca677d6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-07-10 17:45:27.841604",
13-
"spec_repo_commit": "9e0b471a"
12+
"regenerated": "2023-07-11 14:36:39.100169",
13+
"spec_repo_commit": "7ca677d6"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,15 @@ components:
352352
type: array
353353
type: object
354354
AccessRole:
355-
default: st
356355
description: The access role of the user. Options are **st** (standard user),
357356
**adm** (admin user), or **ro** (read-only user).
358357
enum:
359358
- st
360359
- adm
361360
- ro
362361
- ERROR
363-
example: st
362+
example: ro
363+
nullable: true
364364
type: string
365365
x-enum-varnames:
366366
- STANDARD
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-07-10T18:57:28.744Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Users/Create a user returns \"User created\" response test",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "c6a3807891b69d0016b7a45bf564a768",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 115,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 549,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"access_role\":\"st\",\"disabled\":false,\"email\":\"test@datadoghq.com\",\"handle\":\"test@datadoghq.com\",\"name\":\"test user\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/user"
39+
},
40+
"response": {
41+
"bodySize": 274,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 274,
45+
"text": "{\"user\":{\"handle\":\"test@datadoghq.com\",\"name\":\"test user\",\"role\":null,\"title\":null,\"email\":\"test@datadoghq.com\",\"disabled\":false,\"access_role\":null,\"is_admin\":false,\"icon\":\"https://secure.gravatar.com/avatar/f979f58720feb88e09cc3d11ce3d15da?s=48&d=retro\",\"verified\":false}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 650,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2023-07-10T18:57:28.752Z",
61+
"time": 506
62+
},
63+
{
64+
"_id": "af6170722860ba27e045b00c8baf0187",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 520,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/user/test%40datadoghq.com"
82+
},
83+
"response": {
84+
"bodySize": 47,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 47,
88+
"text": "{\"message\":\"User test@datadoghq.com disabled\"}\n"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 516,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2023-07-10T18:57:29.271Z",
104+
"time": 208
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-07-10T18:58:47.628Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Users/Create a user returns null access role",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "caca59e8b77c5fba34ff14276808609d",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 115,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 549,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"access_role\":null,\"disabled\":false,\"email\":\"test@datadoghq.com\",\"handle\":\"test@datadoghq.com\",\"name\":\"test user\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/user"
39+
},
40+
"response": {
41+
"bodySize": 273,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 273,
45+
"text": "{\"user\":{\"handle\":\"test@datadoghq.com\",\"name\":\"test user\",\"role\":null,\"title\":null,\"email\":\"test@datadoghq.com\",\"disabled\":true,\"access_role\":null,\"is_admin\":false,\"icon\":\"https://secure.gravatar.com/avatar/f979f58720feb88e09cc3d11ce3d15da?s=48&d=retro\",\"verified\":false}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 650,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2023-07-10T18:58:47.635Z",
61+
"time": 624
62+
},
63+
{
64+
"_id": "af6170722860ba27e045b00c8baf0187",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 520,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/user/test%40datadoghq.com"
82+
},
83+
"response": {
84+
"bodySize": 39,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 39,
88+
"text": "{\"errors\":[\"User is already disabled\"]}"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 516,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 400,
101+
"statusText": "Bad Request"
102+
},
103+
"startedDateTime": "2023-07-10T18:58:48.272Z",
104+
"time": 140
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}

examples/v1/organizations/UpdateOrg.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const params: v1.OrganizationsApiUpdateOrgRequest = {
2020
saml: {
2121
enabled: false,
2222
},
23-
samlAutocreateAccessRole: "st",
23+
samlAutocreateAccessRole: "ro",
2424
samlAutocreateUsersDomains: {
2525
domains: ["example.com"],
2626
enabled: false,

examples/v1/users/CreateUser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const apiInstance = new v1.UsersApi(configuration);
99

1010
const params: v1.UsersApiCreateUserRequest = {
1111
body: {
12-
accessRole: "st",
12+
accessRole: "ro",
1313
disabled: false,
1414
email: "test@datadoghq.com",
1515
handle: "test@datadoghq.com",
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Create a user returns null access role
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.UsersApi(configuration);
9+
10+
const params: v1.UsersApiCreateUserRequest = {
11+
body: {
12+
accessRole: undefined,
13+
disabled: false,
14+
email: "test@datadoghq.com",
15+
handle: "test@datadoghq.com",
16+
name: "test user",
17+
},
18+
};
19+
20+
apiInstance
21+
.createUser(params)
22+
.then((data: v1.UserResponse) => {
23+
console.log(
24+
"API called successfully. Returned data: " + JSON.stringify(data)
25+
);
26+
})
27+
.catch((error: any) => console.error(error));

examples/v1/users/UpdateUser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const apiInstance = new v1.UsersApi(configuration);
99

1010
const params: v1.UsersApiUpdateUserRequest = {
1111
body: {
12-
accessRole: "st",
12+
accessRole: "ro",
1313
disabled: false,
1414
email: "test@datadoghq.com",
1515
handle: "test@datadoghq.com",

features/v1/organizations.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ Feature: Organizations
6060
Scenario: Update your organization returns "Bad Request" response
6161
Given new "UpdateOrg" request
6262
And request contains "public_id" parameter from "REPLACE.ME"
63-
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
63+
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "ro", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
6464
When the request is sent
6565
Then the response status is 400 Bad Request
6666

6767
@generated @skip @team:DataDog/team-aaa-identity
6868
Scenario: Update your organization returns "OK" response
6969
Given new "UpdateOrg" request
7070
And request contains "public_id" parameter from "REPLACE.ME"
71-
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
71+
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "ro", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
7272
When the request is sent
7373
Then the response status is 200 OK
7474

features/v1/users.feature

+14-6
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,32 @@ Feature: Users
1010
@generated @skip @team:DataDog/team-aaa-identity
1111
Scenario: Create a user returns "Bad Request" response
1212
Given new "CreateUser" request
13-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
13+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
1414
When the request is sent
1515
Then the response status is 400 Bad Request
1616

1717
@generated @skip @team:DataDog/team-aaa-identity
1818
Scenario: Create a user returns "Conflict" response
1919
Given new "CreateUser" request
20-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
20+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
2121
When the request is sent
2222
Then the response status is 409 Conflict
2323

2424
@generated @skip @team:DataDog/team-aaa-identity
2525
Scenario: Create a user returns "User created" response
2626
Given new "CreateUser" request
27-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
27+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
2828
When the request is sent
2929
Then the response status is 200 User created
3030

31+
@replay-only @team:DataDog/team-aaa-identity
32+
Scenario: Create a user returns null access role
33+
Given new "CreateUser" request
34+
And body with value {"access_role": null, "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
35+
When the request is sent
36+
Then the response status is 200 User created
37+
And the response "user.access_role" is equal to null
38+
3139
@generated @skip @team:DataDog/team-aaa-identity
3240
Scenario: Disable a user returns "Bad Request" response
3341
Given new "DisableUser" request
@@ -73,22 +81,22 @@ Feature: Users
7381
Scenario: Update a user returns "Bad Request" response
7482
Given new "UpdateUser" request
7583
And request contains "user_handle" parameter from "REPLACE.ME"
76-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
84+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
7785
When the request is sent
7886
Then the response status is 400 Bad Request
7987

8088
@generated @skip @team:DataDog/team-aaa-identity
8189
Scenario: Update a user returns "Not Found" response
8290
Given new "UpdateUser" request
8391
And request contains "user_handle" parameter from "REPLACE.ME"
84-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
92+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
8593
When the request is sent
8694
Then the response status is 404 Not Found
8795

8896
@generated @skip @team:DataDog/team-aaa-identity
8997
Scenario: Update a user returns "User updated" response
9098
Given new "UpdateUser" request
9199
And request contains "user_handle" parameter from "REPLACE.ME"
92-
And body with value {"access_role": "st", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
100+
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
93101
When the request is sent
94102
Then the response status is 200 User updated

0 commit comments

Comments
 (0)