Skip to content

Commit

Permalink
Regenerate client from commit 7e490450 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 24, 2023
1 parent 3ae4bd2 commit dcacf36
Show file tree
Hide file tree
Showing 14 changed files with 343 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-23 18:35:31.549940",
"spec_repo_commit": "696abec0"
"regenerated": "2023-10-24 18:01:03.306087",
"spec_repo_commit": "7e490450"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-23 18:35:31.566621",
"spec_repo_commit": "696abec0"
"regenerated": "2023-10-24 18:01:03.321428",
"spec_repo_commit": "7e490450"
}
}
}
78 changes: 76 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ components:
headers: {}
links: {}
parameters:
APIKeyCategoryParameter:
description: Filter API keys by category.
in: query
name: filter[category]
required: false
schema:
type: string
APIKeyFilterCreatedAtEndParameter:
description: Only include API keys created on or before the specified date.
in: query
Expand Down Expand Up @@ -59,6 +66,13 @@ components:
schema:
example: created_by,modified_by
type: string
APIKeyReadConfigReadEnabledParameter:
description: Filter API keys by remote config read enabled status.
in: query
name: filter[remote_config_read_enabled]
required: false
schema:
type: boolean
APIKeysSortParameter:
description: 'API key attribute used to sort results. Sort order is ascending

Expand Down Expand Up @@ -17744,6 +17758,41 @@ components:
required:
- data
type: object
TeamsField:
description: Supported teams field.
enum:
- id
- name
- handle
- summary
- description
- avatar
- banner
- visible_modules
- hidden_modules
- created_at
- modified_at
- user_count
- link_count
- team_links
- user_team_permissions
type: string
x-enum-varnames:
- ID
- NAME
- HANDLE
- SUMMARY
- DESCRIPTION
- AVATAR
- BANNER
- VISIBLE_MODULES
- HIDDEN_MODULES
- CREATED_AT
- MODIFIED_AT
- USER_COUNT
- LINK_COUNT
- TEAM_LINKS
- USER_TEAM_PERMISSIONS
TeamsResponse:
description: Response with multiple teams
properties:
Expand Down Expand Up @@ -18378,8 +18427,8 @@ components:
description: User team permission attributes
properties:
permissions:
description: Object of team permission actions and boolean values indicating
of the currently logged in user can perform them on this team
description: Object of team permission actions and boolean values that a
logged in user can perform on this team.
readOnly: true
type: object
type: object
Expand Down Expand Up @@ -18634,6 +18683,8 @@ paths:
- $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
- $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
- $ref: '#/components/parameters/APIKeyIncludeParameter'
- $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
- $ref: '#/components/parameters/APIKeyCategoryParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -19067,6 +19118,7 @@ paths:
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -20106,6 +20158,7 @@ paths:
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -25055,6 +25108,12 @@ paths:
required: false
schema:
type: string
- description: Filter all roles by the given list of role IDs.
in: query
name: filter[id]
required: false
schema:
type: string
responses:
'200':
content:
Expand Down Expand Up @@ -27775,12 +27834,14 @@ paths:
- description: Specifies the order of the returned teams
in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/ListTeamsSort'
- description: 'Included related resources optionally requested. Allowed enum
values: `team_links, user_team_permissions`'
in: query
name: include
required: false
schema:
items:
$ref: '#/components/schemas/ListTeamsInclude'
Expand All @@ -27789,13 +27850,24 @@ paths:
member
in: query
name: filter[keyword]
required: false
schema:
type: string
- description: When true, only returns teams the current user belongs to
in: query
name: filter[me]
required: false
schema:
type: boolean
- description: List of fields that need to be fetched.
explode: false
in: query
name: fields[team]
required: false
schema:
items:
$ref: '#/components/schemas/TeamsField'
type: array
responses:
'200':
content:
Expand Down Expand Up @@ -28210,11 +28282,13 @@ paths:
- description: Specifies the order of returned team memberships
in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/GetTeamMembershipsSort'
- description: Search query, can be user email or name
in: query
name: filter[keyword]
required: false
schema:
type: string
responses:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-10-11T17:40:11.903Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"log": {
"_recordingName": "Teams/Get all teams with fields_team parameter returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "e8920722757839c9ea01a896837e687d",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 530,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [
{
"name": "fields",
"value": {
"team": "id,name,handle"
}
}
],
"url": "https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id%2Cname%2Chandle"
},
"response": {
"bodySize": 938,
"content": {
"mimeType": "application/json",
"size": 938,
"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"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 653,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-10-11T17:40:11.911Z",
"time": 202
}
],
"pages": [],
"version": "1.2"
}
}
21 changes: 21 additions & 0 deletions examples/v2/teams/ListTeams_3429963470.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Get all teams with fields_team parameter returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.TeamsApi(configuration);

const params: v2.TeamsApiListTeamsRequest = {
fieldsTeam: ["id", "name", "handle"],
};

apiInstance
.listTeams(params)
.then((data: v2.TeamsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
24 changes: 24 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2310,6 +2310,14 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"filterRemoteConfigReadEnabled": {
"type": "boolean",
"format": "",
},
"filterCategory": {
"type": "string",
"format": "",
},
"operationResponseType": "APIKeysResponse",
},
"v2.CreateAPIKey": {
Expand Down Expand Up @@ -2373,6 +2381,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"include": {
"type": "string",
"format": "",
},
"operationResponseType": "ListApplicationKeysResponse",
},
"v2.DeleteApplicationKey": {
Expand Down Expand Up @@ -2429,6 +2441,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"include": {
"type": "string",
"format": "",
},
"operationResponseType": "ListApplicationKeysResponse",
},
"v2.CreateCurrentUserApplicationKey": {
Expand Down Expand Up @@ -3798,6 +3814,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"filterId": {
"type": "string",
"format": "",
},
"operationResponseType": "RolesResponse",
},
"v2.CreateRole": {
Expand Down Expand Up @@ -4686,6 +4706,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "boolean",
"format": "",
},
"fieldsTeam": {
"type": "Array<TeamsField>",
"format": "",
},
"operationResponseType": "TeamsResponse",
},
"v2.CreateTeam": {
Expand Down
10 changes: 10 additions & 0 deletions features/v2/teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ Feature: Teams
Then the response status is 200 OK
And the response has 3 items

@team:DataDog/core-app
Scenario: Get all teams with fields_team parameter returns "OK" response
Given new "ListTeams" request
And request contains "fields[team]" parameter with value ["id", "name", "handle"]
When the request is sent
Then the response status is 200 OK
And the response "data[0]" has field "id"
And the response "data[0].attributes" has field "name"
And the response "data[0].attributes" has field "handle"

@team:DataDog/core-app
Scenario: Get links for a team returns "API error response." response
Given new "GetTeamLinks" request
Expand Down
Loading

0 comments on commit dcacf36

Please sign in to comment.