Skip to content

Commit dcacf36

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7e490450 of spec repo
1 parent 3ae4bd2 commit dcacf36

File tree

14 files changed

+343
-7
lines changed

14 files changed

+343
-7
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": "2023-10-23 18:35:31.549940",
8-
"spec_repo_commit": "696abec0"
7+
"regenerated": "2023-10-24 18:01:03.306087",
8+
"spec_repo_commit": "7e490450"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-23 18:35:31.566621",
13-
"spec_repo_commit": "696abec0"
12+
"regenerated": "2023-10-24 18:01:03.321428",
13+
"spec_repo_commit": "7e490450"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ components:
44
headers: {}
55
links: {}
66
parameters:
7+
APIKeyCategoryParameter:
8+
description: Filter API keys by category.
9+
in: query
10+
name: filter[category]
11+
required: false
12+
schema:
13+
type: string
714
APIKeyFilterCreatedAtEndParameter:
815
description: Only include API keys created on or before the specified date.
916
in: query
@@ -59,6 +66,13 @@ components:
5966
schema:
6067
example: created_by,modified_by
6168
type: string
69+
APIKeyReadConfigReadEnabledParameter:
70+
description: Filter API keys by remote config read enabled status.
71+
in: query
72+
name: filter[remote_config_read_enabled]
73+
required: false
74+
schema:
75+
type: boolean
6276
APIKeysSortParameter:
6377
description: 'API key attribute used to sort results. Sort order is ascending
6478

@@ -17744,6 +17758,41 @@ components:
1774417758
required:
1774517759
- data
1774617760
type: object
17761+
TeamsField:
17762+
description: Supported teams field.
17763+
enum:
17764+
- id
17765+
- name
17766+
- handle
17767+
- summary
17768+
- description
17769+
- avatar
17770+
- banner
17771+
- visible_modules
17772+
- hidden_modules
17773+
- created_at
17774+
- modified_at
17775+
- user_count
17776+
- link_count
17777+
- team_links
17778+
- user_team_permissions
17779+
type: string
17780+
x-enum-varnames:
17781+
- ID
17782+
- NAME
17783+
- HANDLE
17784+
- SUMMARY
17785+
- DESCRIPTION
17786+
- AVATAR
17787+
- BANNER
17788+
- VISIBLE_MODULES
17789+
- HIDDEN_MODULES
17790+
- CREATED_AT
17791+
- MODIFIED_AT
17792+
- USER_COUNT
17793+
- LINK_COUNT
17794+
- TEAM_LINKS
17795+
- USER_TEAM_PERMISSIONS
1774717796
TeamsResponse:
1774817797
description: Response with multiple teams
1774917798
properties:
@@ -18378,8 +18427,8 @@ components:
1837818427
description: User team permission attributes
1837918428
properties:
1838018429
permissions:
18381-
description: Object of team permission actions and boolean values indicating
18382-
of the currently logged in user can perform them on this team
18430+
description: Object of team permission actions and boolean values that a
18431+
logged in user can perform on this team.
1838318432
readOnly: true
1838418433
type: object
1838518434
type: object
@@ -18634,6 +18683,8 @@ paths:
1863418683
- $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
1863518684
- $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
1863618685
- $ref: '#/components/parameters/APIKeyIncludeParameter'
18686+
- $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
18687+
- $ref: '#/components/parameters/APIKeyCategoryParameter'
1863718688
responses:
1863818689
'200':
1863918690
content:
@@ -19067,6 +19118,7 @@ paths:
1906719118
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
1906819119
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
1906919120
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
19121+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
1907019122
responses:
1907119123
'200':
1907219124
content:
@@ -20106,6 +20158,7 @@ paths:
2010620158
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
2010720159
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
2010820160
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
20161+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
2010920162
responses:
2011020163
'200':
2011120164
content:
@@ -25055,6 +25108,12 @@ paths:
2505525108
required: false
2505625109
schema:
2505725110
type: string
25111+
- description: Filter all roles by the given list of role IDs.
25112+
in: query
25113+
name: filter[id]
25114+
required: false
25115+
schema:
25116+
type: string
2505825117
responses:
2505925118
'200':
2506025119
content:
@@ -27775,12 +27834,14 @@ paths:
2777527834
- description: Specifies the order of the returned teams
2777627835
in: query
2777727836
name: sort
27837+
required: false
2777827838
schema:
2777927839
$ref: '#/components/schemas/ListTeamsSort'
2778027840
- description: 'Included related resources optionally requested. Allowed enum
2778127841
values: `team_links, user_team_permissions`'
2778227842
in: query
2778327843
name: include
27844+
required: false
2778427845
schema:
2778527846
items:
2778627847
$ref: '#/components/schemas/ListTeamsInclude'
@@ -27789,13 +27850,24 @@ paths:
2778927850
member
2779027851
in: query
2779127852
name: filter[keyword]
27853+
required: false
2779227854
schema:
2779327855
type: string
2779427856
- description: When true, only returns teams the current user belongs to
2779527857
in: query
2779627858
name: filter[me]
27859+
required: false
2779727860
schema:
2779827861
type: boolean
27862+
- description: List of fields that need to be fetched.
27863+
explode: false
27864+
in: query
27865+
name: fields[team]
27866+
required: false
27867+
schema:
27868+
items:
27869+
$ref: '#/components/schemas/TeamsField'
27870+
type: array
2779927871
responses:
2780027872
'200':
2780127873
content:
@@ -28210,11 +28282,13 @@ paths:
2821028282
- description: Specifies the order of returned team memberships
2821128283
in: query
2821228284
name: sort
28285+
required: false
2821328286
schema:
2821428287
$ref: '#/components/schemas/GetTeamMembershipsSort'
2821528288
- description: Search query, can be user email or name
2821628289
in: query
2821728290
name: filter[keyword]
28291+
required: false
2821828292
schema:
2821928293
type: string
2822028294
responses:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-10-11T17:40:11.903Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"log": {
3+
"_recordingName": "Teams/Get all teams with fields_team parameter returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "e8920722757839c9ea01a896837e687d",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 530,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "fields",
30+
"value": {
31+
"team": "id,name,handle"
32+
}
33+
}
34+
],
35+
"url": "https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id%2Cname%2Chandle"
36+
},
37+
"response": {
38+
"bodySize": 938,
39+
"content": {
40+
"mimeType": "application/json",
41+
"size": 938,
42+
"text": "{\"data\":[{\"type\":\"team\",\"id\":\"ac73040e-c8d4-11ed-b2ea-da7ad0900002\",\"attributes\":{\"name\":\"Example Team\",\"handle\":\"api-spec-test-team\"}},{\"type\":\"team\",\"id\":\"cc338b02-405b-11ee-835e-da7ad0900002\",\"attributes\":{\"name\":\"test-name-12938712938\",\"handle\":\"test-handle-12938712938\"}},{\"type\":\"team\",\"id\":\"ecc8affc-27d6-11ee-b33c-da7ad0900002\",\"attributes\":{\"name\":\"tf-testaccteamlinkbasic-local-1689951453\",\"handle\":\"tf-testaccteamlinkbasic-local-1689951453\"}}],\"meta\":{\"pagination\":{\"offset\":0,\"first_offset\":0,\"prev_offset\":0,\"next_offset\":100,\"last_offset\":0,\"limit\":100,\"type\":\"offset_limit\",\"total\":3}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle&page[offset]=100&page[limit]=100\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle&page[offset]=0&page[limit]=100\"}}\n"
43+
},
44+
"cookies": [],
45+
"headers": [
46+
{
47+
"name": "content-type",
48+
"value": "application/json"
49+
}
50+
],
51+
"headersSize": 653,
52+
"httpVersion": "HTTP/1.1",
53+
"redirectURL": "",
54+
"status": 200,
55+
"statusText": "OK"
56+
},
57+
"startedDateTime": "2023-10-11T17:40:11.911Z",
58+
"time": 202
59+
}
60+
],
61+
"pages": [],
62+
"version": "1.2"
63+
}
64+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get all teams with fields_team parameter returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.TeamsApi(configuration);
9+
10+
const params: v2.TeamsApiListTeamsRequest = {
11+
fieldsTeam: ["id", "name", "handle"],
12+
};
13+
14+
apiInstance
15+
.listTeams(params)
16+
.then((data: v2.TeamsResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,14 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
23102310
"type": "string",
23112311
"format": "",
23122312
},
2313+
"filterRemoteConfigReadEnabled": {
2314+
"type": "boolean",
2315+
"format": "",
2316+
},
2317+
"filterCategory": {
2318+
"type": "string",
2319+
"format": "",
2320+
},
23132321
"operationResponseType": "APIKeysResponse",
23142322
},
23152323
"v2.CreateAPIKey": {
@@ -2373,6 +2381,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
23732381
"type": "string",
23742382
"format": "",
23752383
},
2384+
"include": {
2385+
"type": "string",
2386+
"format": "",
2387+
},
23762388
"operationResponseType": "ListApplicationKeysResponse",
23772389
},
23782390
"v2.DeleteApplicationKey": {
@@ -2429,6 +2441,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
24292441
"type": "string",
24302442
"format": "",
24312443
},
2444+
"include": {
2445+
"type": "string",
2446+
"format": "",
2447+
},
24322448
"operationResponseType": "ListApplicationKeysResponse",
24332449
},
24342450
"v2.CreateCurrentUserApplicationKey": {
@@ -3798,6 +3814,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
37983814
"type": "string",
37993815
"format": "",
38003816
},
3817+
"filterId": {
3818+
"type": "string",
3819+
"format": "",
3820+
},
38013821
"operationResponseType": "RolesResponse",
38023822
},
38033823
"v2.CreateRole": {
@@ -4686,6 +4706,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
46864706
"type": "boolean",
46874707
"format": "",
46884708
},
4709+
"fieldsTeam": {
4710+
"type": "Array<TeamsField>",
4711+
"format": "",
4712+
},
46894713
"operationResponseType": "TeamsResponse",
46904714
},
46914715
"v2.CreateTeam": {

features/v2/teams.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ Feature: Teams
126126
Then the response status is 200 OK
127127
And the response has 3 items
128128

129+
@team:DataDog/core-app
130+
Scenario: Get all teams with fields_team parameter returns "OK" response
131+
Given new "ListTeams" request
132+
And request contains "fields[team]" parameter with value ["id", "name", "handle"]
133+
When the request is sent
134+
Then the response status is 200 OK
135+
And the response "data[0]" has field "id"
136+
And the response "data[0].attributes" has field "name"
137+
And the response "data[0].attributes" has field "handle"
138+
129139
@team:DataDog/core-app
130140
Scenario: Get links for a team returns "API error response." response
131141
Given new "GetTeamLinks" request

0 commit comments

Comments
 (0)