Skip to content

Commit 5410755

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a0d45efc of spec repo
1 parent 5079f76 commit 5410755

File tree

14 files changed

+340
-7
lines changed

14 files changed

+340
-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-09-26 14:16:48.035277",
8-
"spec_repo_commit": "0270a00c"
7+
"regenerated": "2023-09-27 19:56:39.496254",
8+
"spec_repo_commit": "a0d45efc"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-09-26 14:16:48.056865",
13-
"spec_repo_commit": "0270a00c"
12+
"regenerated": "2023-09-27 19:56:39.513537",
13+
"spec_repo_commit": "a0d45efc"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 75 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

@@ -16731,6 +16745,41 @@ components:
1673116745
required:
1673216746
- data
1673316747
type: object
16748+
TeamsField:
16749+
description: Supported teams field.
16750+
enum:
16751+
- id
16752+
- name
16753+
- handle
16754+
- summary
16755+
- description
16756+
- avatar
16757+
- banner
16758+
- visible_modules
16759+
- hidden_modules
16760+
- created_at
16761+
- modified_at
16762+
- user_count
16763+
- link_count
16764+
- team_links
16765+
- user_team_permissions
16766+
type: string
16767+
x-enum-varnames:
16768+
- ID
16769+
- NAME
16770+
- HANDLE
16771+
- SUMMARY
16772+
- DESCRIPTION
16773+
- AVATAR
16774+
- BANNER
16775+
- VISIBLE_MODULES
16776+
- HIDDEN_MODULES
16777+
- CREATED_AT
16778+
- MODIFIED_AT
16779+
- USER_COUNT
16780+
- LINK_COUNT
16781+
- TEAM_LINKS
16782+
- USER_TEAM_PERMISSIONS
1673416783
TeamsResponse:
1673516784
description: Response with multiple teams
1673616785
properties:
@@ -17365,8 +17414,8 @@ components:
1736517414
description: User team permission attributes
1736617415
properties:
1736717416
permissions:
17368-
description: Object of team permission actions and boolean values indicating
17369-
of the currently logged in user can perform them on this team
17417+
description: Object of team permission actions and boolean values that a
17418+
logged in user can perform on this team.
1737017419
readOnly: true
1737117420
type: object
1737217421
type: object
@@ -17621,6 +17670,8 @@ paths:
1762117670
- $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
1762217671
- $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
1762317672
- $ref: '#/components/parameters/APIKeyIncludeParameter'
17673+
- $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
17674+
- $ref: '#/components/parameters/APIKeyCategoryParameter'
1762417675
responses:
1762517676
'200':
1762617677
content:
@@ -18053,6 +18104,7 @@ paths:
1805318104
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
1805418105
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
1805518106
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
18107+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
1805618108
responses:
1805718109
'200':
1805818110
content:
@@ -18934,6 +18986,7 @@ paths:
1893418986
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
1893518987
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
1893618988
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
18989+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
1893718990
responses:
1893818991
'200':
1893918992
content:
@@ -23702,6 +23755,12 @@ paths:
2370223755
required: false
2370323756
schema:
2370423757
type: string
23758+
- description: Filter all roles by the given list of role IDs.
23759+
in: query
23760+
name: filter[id]
23761+
required: false
23762+
schema:
23763+
type: string
2370523764
responses:
2370623765
'200':
2370723766
content:
@@ -26422,12 +26481,14 @@ paths:
2642226481
- description: Specifies the order of the returned teams
2642326482
in: query
2642426483
name: sort
26484+
required: false
2642526485
schema:
2642626486
$ref: '#/components/schemas/ListTeamsSort'
2642726487
- description: 'Included related resources optionally requested. Allowed enum
2642826488
values: `team_links, user_team_permissions`'
2642926489
in: query
2643026490
name: include
26491+
required: false
2643126492
schema:
2643226493
items:
2643326494
$ref: '#/components/schemas/ListTeamsInclude'
@@ -26436,13 +26497,23 @@ paths:
2643626497
member
2643726498
in: query
2643826499
name: filter[keyword]
26500+
required: false
2643926501
schema:
2644026502
type: string
2644126503
- description: When true, only returns teams the current user belongs to
2644226504
in: query
2644326505
name: filter[me]
26506+
required: false
2644426507
schema:
2644526508
type: boolean
26509+
- description: List of fields that need to be fetched.
26510+
in: query
26511+
name: fields[team]
26512+
required: false
26513+
schema:
26514+
items:
26515+
$ref: '#/components/schemas/TeamsField'
26516+
type: array
2644626517
responses:
2644726518
'200':
2644826519
content:
@@ -26837,11 +26908,13 @@ paths:
2683726908
- description: Specifies the order of returned team memberships
2683826909
in: query
2683926910
name: sort
26911+
required: false
2684026912
schema:
2684126913
$ref: '#/components/schemas/GetTeamMembershipsSort'
2684226914
- description: Search query, can be user email or name
2684326915
in: query
2684426916
name: filter[keyword]
26917+
required: false
2684526918
schema:
2684626919
type: string
2684726920
responses:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-09-27T19:53:13.057Z"
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": "4aeec0c800b2d080a618312ef1af24a6",
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": 514,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "fields",
30+
"value": {
31+
"team": "id"
32+
}
33+
}
34+
],
35+
"url": "https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id"
36+
},
37+
"response": {
38+
"bodySize": 637,
39+
"content": {
40+
"mimeType": "application/json",
41+
"size": 637,
42+
"text": "{\"data\":[{\"type\":\"team\",\"id\":\"ac73040e-c8d4-11ed-b2ea-da7ad0900002\"},{\"type\":\"team\",\"id\":\"cc338b02-405b-11ee-835e-da7ad0900002\"},{\"type\":\"team\",\"id\":\"ecc8affc-27d6-11ee-b33c-da7ad0900002\"}],\"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\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id&page[offset]=100&page[limit]=100\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id&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-09-27T19:53:13.067Z",
58+
"time": 188
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"],
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": {
@@ -3745,6 +3761,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
37453761
"type": "string",
37463762
"format": "",
37473763
},
3764+
"filterId": {
3765+
"type": "string",
3766+
"format": "",
3767+
},
37483768
"operationResponseType": "RolesResponse",
37493769
},
37503770
"v2.CreateRole": {
@@ -4590,6 +4610,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
45904610
"type": "boolean",
45914611
"format": "",
45924612
},
4613+
"fieldsTeam": {
4614+
"type": "Array<TeamsField>",
4615+
"format": "",
4616+
},
45934617
"operationResponseType": "TeamsResponse",
45944618
},
45954619
"v2.CreateTeam": {

features/v2/teams.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ 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"]
133+
When the request is sent
134+
Then the response status is 200 OK
135+
And the response "data[0]" has field "id"
136+
129137
@team:DataDog/core-app
130138
Scenario: Get links for a team returns "API error response." response
131139
Given new "GetTeamLinks" request

0 commit comments

Comments
 (0)