Skip to content

Commit

Permalink
Regenerate client from commit a0d45efc of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 27, 2023
1 parent 5079f76 commit 5410755
Show file tree
Hide file tree
Showing 14 changed files with 340 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-09-26 14:16:48.035277",
"spec_repo_commit": "0270a00c"
"regenerated": "2023-09-27 19:56:39.496254",
"spec_repo_commit": "a0d45efc"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-09-26 14:16:48.056865",
"spec_repo_commit": "0270a00c"
"regenerated": "2023-09-27 19:56:39.513537",
"spec_repo_commit": "a0d45efc"
}
}
}
77 changes: 75 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 @@ -16731,6 +16745,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 @@ -17365,8 +17414,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 @@ -17621,6 +17670,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 @@ -18053,6 +18104,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 @@ -18934,6 +18986,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 @@ -23702,6 +23755,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 @@ -26422,12 +26481,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 @@ -26436,13 +26497,23 @@ 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.
in: query
name: fields[team]
required: false
schema:
items:
$ref: '#/components/schemas/TeamsField'
type: array
responses:
'200':
content:
Expand Down Expand Up @@ -26837,11 +26908,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-09-27T19:53:13.057Z"
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": "4aeec0c800b2d080a618312ef1af24a6",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 514,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [
{
"name": "fields",
"value": {
"team": "id"
}
}
],
"url": "https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id"
},
"response": {
"bodySize": 637,
"content": {
"mimeType": "application/json",
"size": 637,
"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"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 653,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-09-27T19:53:13.067Z",
"time": 188
}
],
"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"],
};

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 @@ -3745,6 +3761,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "string",
"format": "",
},
"filterId": {
"type": "string",
"format": "",
},
"operationResponseType": "RolesResponse",
},
"v2.CreateRole": {
Expand Down Expand Up @@ -4590,6 +4610,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
"type": "boolean",
"format": "",
},
"fieldsTeam": {
"type": "Array<TeamsField>",
"format": "",
},
"operationResponseType": "TeamsResponse",
},
"v2.CreateTeam": {
Expand Down
8 changes: 8 additions & 0 deletions features/v2/teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ 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"]
When the request is sent
Then the response status is 200 OK
And the response "data[0]" has field "id"

@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 5410755

Please sign in to comment.