Skip to content

Commit ae82b4e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 067eac6f of spec repo
1 parent 8ede04c commit ae82b4e

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-10 13:47:29.129078",
8-
"spec_repo_commit": "afb48804"
7+
"regenerated": "2023-10-11 17:56:17.469815",
8+
"spec_repo_commit": "067eac6f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-10 13:47:29.143556",
13-
"spec_repo_commit": "afb48804"
12+
"regenerated": "2023-10-11 17:56:17.484443",
13+
"spec_repo_commit": "067eac6f"
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

@@ -17216,6 +17230,41 @@ components:
1721617230
required:
1721717231
- data
1721817232
type: object
17233+
TeamsField:
17234+
description: Supported teams field.
17235+
enum:
17236+
- id
17237+
- name
17238+
- handle
17239+
- summary
17240+
- description
17241+
- avatar
17242+
- banner
17243+
- visible_modules
17244+
- hidden_modules
17245+
- created_at
17246+
- modified_at
17247+
- user_count
17248+
- link_count
17249+
- team_links
17250+
- user_team_permissions
17251+
type: string
17252+
x-enum-varnames:
17253+
- ID
17254+
- NAME
17255+
- HANDLE
17256+
- SUMMARY
17257+
- DESCRIPTION
17258+
- AVATAR
17259+
- BANNER
17260+
- VISIBLE_MODULES
17261+
- HIDDEN_MODULES
17262+
- CREATED_AT
17263+
- MODIFIED_AT
17264+
- USER_COUNT
17265+
- LINK_COUNT
17266+
- TEAM_LINKS
17267+
- USER_TEAM_PERMISSIONS
1721917268
TeamsResponse:
1722017269
description: Response with multiple teams
1722117270
properties:
@@ -17850,8 +17899,8 @@ components:
1785017899
description: User team permission attributes
1785117900
properties:
1785217901
permissions:
17853-
description: Object of team permission actions and boolean values indicating
17854-
of the currently logged in user can perform them on this team
17902+
description: Object of team permission actions and boolean values that a
17903+
logged in user can perform on this team.
1785517904
readOnly: true
1785617905
type: object
1785717906
type: object
@@ -18106,6 +18155,8 @@ paths:
1810618155
- $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
1810718156
- $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
1810818157
- $ref: '#/components/parameters/APIKeyIncludeParameter'
18158+
- $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
18159+
- $ref: '#/components/parameters/APIKeyCategoryParameter'
1810918160
responses:
1811018161
'200':
1811118162
content:
@@ -18539,6 +18590,7 @@ paths:
1853918590
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
1854018591
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
1854118592
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
18593+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
1854218594
responses:
1854318595
'200':
1854418596
content:
@@ -19420,6 +19472,7 @@ paths:
1942019472
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
1942119473
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
1942219474
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
19475+
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
1942319476
responses:
1942419477
'200':
1942519478
content:
@@ -24353,6 +24406,12 @@ paths:
2435324406
required: false
2435424407
schema:
2435524408
type: string
24409+
- description: Filter all roles by the given list of role IDs.
24410+
in: query
24411+
name: filter[id]
24412+
required: false
24413+
schema:
24414+
type: string
2435624415
responses:
2435724416
'200':
2435824417
content:
@@ -27073,12 +27132,14 @@ paths:
2707327132
- description: Specifies the order of the returned teams
2707427133
in: query
2707527134
name: sort
27135+
required: false
2707627136
schema:
2707727137
$ref: '#/components/schemas/ListTeamsSort'
2707827138
- description: 'Included related resources optionally requested. Allowed enum
2707927139
values: `team_links, user_team_permissions`'
2708027140
in: query
2708127141
name: include
27142+
required: false
2708227143
schema:
2708327144
items:
2708427145
$ref: '#/components/schemas/ListTeamsInclude'
@@ -27087,13 +27148,24 @@ paths:
2708727148
member
2708827149
in: query
2708927150
name: filter[keyword]
27151+
required: false
2709027152
schema:
2709127153
type: string
2709227154
- description: When true, only returns teams the current user belongs to
2709327155
in: query
2709427156
name: filter[me]
27157+
required: false
2709527158
schema:
2709627159
type: boolean
27160+
- description: List of fields that need to be fetched.
27161+
explode: false
27162+
in: query
27163+
name: fields[team]
27164+
required: false
27165+
schema:
27166+
items:
27167+
$ref: '#/components/schemas/TeamsField'
27168+
type: array
2709727169
responses:
2709827170
'200':
2709927171
content:
@@ -27508,11 +27580,13 @@ paths:
2750827580
- description: Specifies the order of returned team memberships
2750927581
in: query
2751027582
name: sort
27583+
required: false
2751127584
schema:
2751227585
$ref: '#/components/schemas/GetTeamMembershipsSort'
2751327586
- description: Search query, can be user email or name
2751427587
in: query
2751527588
name: filter[keyword]
27589+
required: false
2751627590
schema:
2751727591
type: string
2751827592
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": {
@@ -3752,6 +3768,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
37523768
"type": "string",
37533769
"format": "",
37543770
},
3771+
"filterId": {
3772+
"type": "string",
3773+
"format": "",
3774+
},
37553775
"operationResponseType": "RolesResponse",
37563776
},
37573777
"v2.CreateRole": {
@@ -4632,6 +4652,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
46324652
"type": "boolean",
46334653
"format": "",
46344654
},
4655+
"fieldsTeam": {
4656+
"type": "Array<TeamsField>",
4657+
"format": "",
4658+
},
46354659
"operationResponseType": "TeamsResponse",
46364660
},
46374661
"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)