Skip to content

Commit c2636a5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 919fef7 of spec repo
1 parent 708cff6 commit c2636a5

20 files changed

Lines changed: 1445 additions & 84 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 281 additions & 30 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Delete an entity integration configuration returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteEntityIntegrationConfig"] = true;
9+
const apiInstance = new v2.EntityIntegrationConfigsApi(configuration);
10+
11+
const params: v2.EntityIntegrationConfigsApiDeleteEntityIntegrationConfigRequest =
12+
{
13+
integrationId: "github",
14+
};
15+
16+
apiInstance
17+
.deleteEntityIntegrationConfig(params)
18+
.then((data: any) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Get an entity integration configuration returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getEntityIntegrationConfig"] = true;
9+
const apiInstance = new v2.EntityIntegrationConfigsApi(configuration);
10+
11+
const params: v2.EntityIntegrationConfigsApiGetEntityIntegrationConfigRequest =
12+
{
13+
integrationId: "github",
14+
};
15+
16+
apiInstance
17+
.getEntityIntegrationConfig(params)
18+
.then((data: v2.EntityIntegrationConfigResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Create or update entity integration config returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateEntityIntegrationConfig"] = true;
9+
const apiInstance = new v2.EntityIntegrationConfigsApi(configuration);
10+
11+
const params: v2.EntityIntegrationConfigsApiUpdateEntityIntegrationConfigRequest =
12+
{
13+
body: {
14+
data: {
15+
attributes: {
16+
config: {
17+
enabled_repos:
18+
"[{'github_org_name': 'myorg', 'hostname': 'github.com', 'repo_name': 'myrepo'}]",
19+
},
20+
},
21+
type: "entity_integration_config_requests",
22+
},
23+
},
24+
integrationId: "github",
25+
};
26+
27+
apiInstance
28+
.updateEntityIntegrationConfig(params)
29+
.then((data: v2.EntityIntegrationConfigResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8228,6 +8228,31 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
82288228
},
82298229
"operationResponseType": "HamrOrgConnectionResponse",
82308230
},
8231+
"v2.GetEntityIntegrationConfig": {
8232+
"integrationId": {
8233+
"type": "string",
8234+
"format": "",
8235+
},
8236+
"operationResponseType": "EntityIntegrationConfigResponse",
8237+
},
8238+
"v2.UpdateEntityIntegrationConfig": {
8239+
"integrationId": {
8240+
"type": "string",
8241+
"format": "",
8242+
},
8243+
"body": {
8244+
"type": "EntityIntegrationConfigRequest",
8245+
"format": "",
8246+
},
8247+
"operationResponseType": "EntityIntegrationConfigResponse",
8248+
},
8249+
"v2.DeleteEntityIntegrationConfig": {
8250+
"integrationId": {
8251+
"type": "string",
8252+
"format": "",
8253+
},
8254+
"operationResponseType": "{}",
8255+
},
82318256
"v2.ListIncidents": {
82328257
"include": {
82338258
"type": "Array<IncidentRelatedObject>",
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
@endpoint(entity-integration-configs) @endpoint(entity-integration-configs-v2)
2+
Feature: Entity Integration Configs
3+
Manage per-integration configurations for the Internal Developer Portal
4+
(IDP). These configurations control which external resources (for example,
5+
GitHub repositories, Jira projects, or PagerDuty services) are synced as
6+
entities into the Software Catalog.
7+
8+
Background:
9+
Given a valid "apiKeyAuth" key in the system
10+
And a valid "appKeyAuth" key in the system
11+
And an instance of "EntityIntegrationConfigs" API
12+
13+
@generated @skip @team:DataDog/idp
14+
Scenario: Create or update entity integration config returns "Bad Request" response
15+
Given operation "UpdateEntityIntegrationConfig" enabled
16+
And new "UpdateEntityIntegrationConfig" request
17+
And request contains "integration_id" parameter from "REPLACE.ME"
18+
And body with value {"data": {"attributes": {"config": {"enabled_repos": [{"github_org_name": "myorg", "hostname": "github.com", "repo_name": "myrepo"}]}}, "type": "entity_integration_config_requests"}}
19+
When the request is sent
20+
Then the response status is 400 Bad Request
21+
22+
@generated @skip @team:DataDog/idp
23+
Scenario: Create or update entity integration config returns "OK" response
24+
Given operation "UpdateEntityIntegrationConfig" enabled
25+
And new "UpdateEntityIntegrationConfig" request
26+
And request contains "integration_id" parameter from "REPLACE.ME"
27+
And body with value {"data": {"attributes": {"config": {"enabled_repos": [{"github_org_name": "myorg", "hostname": "github.com", "repo_name": "myrepo"}]}}, "type": "entity_integration_config_requests"}}
28+
When the request is sent
29+
Then the response status is 200 OK
30+
31+
@generated @skip @team:DataDog/idp
32+
Scenario: Delete an entity integration configuration returns "Bad Request" response
33+
Given operation "DeleteEntityIntegrationConfig" enabled
34+
And new "DeleteEntityIntegrationConfig" request
35+
And request contains "integration_id" parameter from "REPLACE.ME"
36+
When the request is sent
37+
Then the response status is 400 Bad Request
38+
39+
@generated @skip @team:DataDog/idp
40+
Scenario: Delete an entity integration configuration returns "No Content" response
41+
Given operation "DeleteEntityIntegrationConfig" enabled
42+
And new "DeleteEntityIntegrationConfig" request
43+
And request contains "integration_id" parameter from "REPLACE.ME"
44+
When the request is sent
45+
Then the response status is 204 No Content
46+
47+
@generated @skip @team:DataDog/idp
48+
Scenario: Delete an entity integration configuration returns "Not Found" response
49+
Given operation "DeleteEntityIntegrationConfig" enabled
50+
And new "DeleteEntityIntegrationConfig" request
51+
And request contains "integration_id" parameter from "REPLACE.ME"
52+
When the request is sent
53+
Then the response status is 404 Not Found
54+
55+
@generated @skip @team:DataDog/idp
56+
Scenario: Get an entity integration configuration returns "Bad Request" response
57+
Given operation "GetEntityIntegrationConfig" enabled
58+
And new "GetEntityIntegrationConfig" request
59+
And request contains "integration_id" parameter from "REPLACE.ME"
60+
When the request is sent
61+
Then the response status is 400 Bad Request
62+
63+
@generated @skip @team:DataDog/idp
64+
Scenario: Get an entity integration configuration returns "Not Found" response
65+
Given operation "GetEntityIntegrationConfig" enabled
66+
And new "GetEntityIntegrationConfig" request
67+
And request contains "integration_id" parameter from "REPLACE.ME"
68+
When the request is sent
69+
Then the response status is 404 Not Found
70+
71+
@generated @skip @team:DataDog/idp
72+
Scenario: Get an entity integration configuration returns "OK" response
73+
Given operation "GetEntityIntegrationConfig" enabled
74+
And new "GetEntityIntegrationConfig" request
75+
And request contains "integration_id" parameter from "REPLACE.ME"
76+
When the request is sent
77+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,6 +2520,24 @@
25202520
"type": "unsafe"
25212521
}
25222522
},
2523+
"DeleteEntityIntegrationConfig": {
2524+
"tag": "Entity Integration Configs",
2525+
"undo": {
2526+
"type": "idempotent"
2527+
}
2528+
},
2529+
"GetEntityIntegrationConfig": {
2530+
"tag": "Entity Integration Configs",
2531+
"undo": {
2532+
"type": "safe"
2533+
}
2534+
},
2535+
"UpdateEntityIntegrationConfig": {
2536+
"tag": "Entity Integration Configs",
2537+
"undo": {
2538+
"type": "idempotent"
2539+
}
2540+
},
25232541
"ListIncidents": {
25242542
"tag": "Incidents",
25252543
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ export function createConfiguration(
417417
"v2.updateDeploymentRule": false,
418418
"v2.createHamrOrgConnection": false,
419419
"v2.getHamrOrgConnection": false,
420+
"v2.deleteEntityIntegrationConfig": false,
421+
"v2.getEntityIntegrationConfig": false,
422+
"v2.updateEntityIntegrationConfig": false,
420423
"v2.createGlobalIncidentHandle": false,
421424
"v2.createIncident": false,
422425
"v2.createIncidentAttachment": false,

0 commit comments

Comments
 (0)