Skip to content

Commit 9d1abf2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4990175 of spec repo
1 parent 9365bee commit 9d1abf2

File tree

14 files changed

+730
-249
lines changed

14 files changed

+730
-249
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 254 additions & 173 deletions
Large diffs are not rendered by default.

features/v2/teams.feature

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,8 @@ Feature: Teams
112112
And the response "data.attributes.name" is equal to "test-name-{{ unique_hash }}"
113113
And the response "data.attributes.avatar" is equal to "🥑"
114114
And the response "data.attributes.banner" is equal to 7
115-
And the response "data.attributes.visible_modules" has length 2
116-
And the response "data.attributes.visible_modules" array contains value "m1"
117-
And the response "data.attributes.visible_modules" array contains value "m2"
118-
And the response "data.attributes.hidden_modules" has length 1
119-
And the response "data.attributes.hidden_modules" array contains value "m3"
115+
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
116+
And the response "data.attributes.hidden_modules" is equal to ["m3"]
120117

121118
@skip @team:DataDog/aaa-omg
122119
Scenario: Create team connections returns "Bad Request" response

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5546,14 +5546,14 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
55465546
type: "DORAListDeploymentsRequest",
55475547
format: "",
55485548
},
5549-
operationResponseType: "DORAListResponse",
5549+
operationResponseType: "DORADeploymentsListResponse",
55505550
},
55515551
"DORAMetricsApi.V2.GetDORADeployment": {
55525552
deploymentId: {
55535553
type: "string",
55545554
format: "",
55555555
},
5556-
operationResponseType: "DORAFetchResponse",
5556+
operationResponseType: "DORADeploymentFetchResponse",
55575557
},
55585558
"DORAMetricsApi.V2.CreateDORAFailure": {
55595559
body: {
@@ -5574,14 +5574,14 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
55745574
type: "DORAListFailuresRequest",
55755575
format: "",
55765576
},
5577-
operationResponseType: "DORAListResponse",
5577+
operationResponseType: "DORAFailuresListResponse",
55785578
},
55795579
"DORAMetricsApi.V2.GetDORAFailure": {
55805580
failureId: {
55815581
type: "string",
55825582
format: "",
55835583
},
5584-
operationResponseType: "DORAFetchResponse",
5584+
operationResponseType: "DORAFailureFetchResponse",
55855585
},
55865586
"DORAMetricsApi.V2.CreateDORAIncident": {
55875587
body: {

services/dora_metrics/src/v2/DORAMetricsApi.ts

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ import {
2323

2424
import { TypingInfo } from "./models/TypingInfo";
2525
import { APIErrorResponse } from "./models/APIErrorResponse";
26+
import { DORADeploymentFetchResponse } from "./models/DORADeploymentFetchResponse";
2627
import { DORADeploymentRequest } from "./models/DORADeploymentRequest";
2728
import { DORADeploymentResponse } from "./models/DORADeploymentResponse";
29+
import { DORADeploymentsListResponse } from "./models/DORADeploymentsListResponse";
30+
import { DORAFailureFetchResponse } from "./models/DORAFailureFetchResponse";
2831
import { DORAFailureRequest } from "./models/DORAFailureRequest";
2932
import { DORAFailureResponse } from "./models/DORAFailureResponse";
30-
import { DORAFetchResponse } from "./models/DORAFetchResponse";
33+
import { DORAFailuresListResponse } from "./models/DORAFailuresListResponse";
3134
import { DORAListDeploymentsRequest } from "./models/DORAListDeploymentsRequest";
3235
import { DORAListFailuresRequest } from "./models/DORAListFailuresRequest";
33-
import { DORAListResponse } from "./models/DORAListResponse";
3436
import { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse";
3537
import { version } from "../version";
3638

@@ -830,14 +832,14 @@ export class DORAMetricsApiResponseProcessor {
830832
*/
831833
public async getDORADeployment(
832834
response: ResponseContext,
833-
): Promise<DORAFetchResponse> {
835+
): Promise<DORADeploymentFetchResponse> {
834836
const contentType = normalizeMediaType(response.headers["content-type"]);
835837
if (response.httpStatusCode === 200) {
836-
const body: DORAFetchResponse = deserialize(
838+
const body: DORADeploymentFetchResponse = deserialize(
837839
parse(await response.body.text(), contentType),
838840
TypingInfo,
839-
"DORAFetchResponse",
840-
) as DORAFetchResponse;
841+
"DORADeploymentFetchResponse",
842+
) as DORADeploymentFetchResponse;
841843
return body;
842844
}
843845
if (response.httpStatusCode === 400) {
@@ -882,12 +884,12 @@ export class DORAMetricsApiResponseProcessor {
882884

883885
// Work around for missing responses in specification, e.g. for petstore.yaml
884886
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
885-
const body: DORAFetchResponse = deserialize(
887+
const body: DORADeploymentFetchResponse = deserialize(
886888
parse(await response.body.text(), contentType),
887889
TypingInfo,
888-
"DORAFetchResponse",
890+
"DORADeploymentFetchResponse",
889891
"",
890-
) as DORAFetchResponse;
892+
) as DORADeploymentFetchResponse;
891893
return body;
892894
}
893895

@@ -907,14 +909,14 @@ export class DORAMetricsApiResponseProcessor {
907909
*/
908910
public async getDORAFailure(
909911
response: ResponseContext,
910-
): Promise<DORAFetchResponse> {
912+
): Promise<DORAFailureFetchResponse> {
911913
const contentType = normalizeMediaType(response.headers["content-type"]);
912914
if (response.httpStatusCode === 200) {
913-
const body: DORAFetchResponse = deserialize(
915+
const body: DORAFailureFetchResponse = deserialize(
914916
parse(await response.body.text(), contentType),
915917
TypingInfo,
916-
"DORAFetchResponse",
917-
) as DORAFetchResponse;
918+
"DORAFailureFetchResponse",
919+
) as DORAFailureFetchResponse;
918920
return body;
919921
}
920922
if (response.httpStatusCode === 400) {
@@ -959,12 +961,12 @@ export class DORAMetricsApiResponseProcessor {
959961

960962
// Work around for missing responses in specification, e.g. for petstore.yaml
961963
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
962-
const body: DORAFetchResponse = deserialize(
964+
const body: DORAFailureFetchResponse = deserialize(
963965
parse(await response.body.text(), contentType),
964966
TypingInfo,
965-
"DORAFetchResponse",
967+
"DORAFailureFetchResponse",
966968
"",
967-
) as DORAFetchResponse;
969+
) as DORAFailureFetchResponse;
968970
return body;
969971
}
970972

@@ -984,14 +986,14 @@ export class DORAMetricsApiResponseProcessor {
984986
*/
985987
public async listDORADeployments(
986988
response: ResponseContext,
987-
): Promise<DORAListResponse> {
989+
): Promise<DORADeploymentsListResponse> {
988990
const contentType = normalizeMediaType(response.headers["content-type"]);
989991
if (response.httpStatusCode === 200) {
990-
const body: DORAListResponse = deserialize(
992+
const body: DORADeploymentsListResponse = deserialize(
991993
parse(await response.body.text(), contentType),
992994
TypingInfo,
993-
"DORAListResponse",
994-
) as DORAListResponse;
995+
"DORADeploymentsListResponse",
996+
) as DORADeploymentsListResponse;
995997
return body;
996998
}
997999
if (response.httpStatusCode === 400) {
@@ -1036,12 +1038,12 @@ export class DORAMetricsApiResponseProcessor {
10361038

10371039
// Work around for missing responses in specification, e.g. for petstore.yaml
10381040
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1039-
const body: DORAListResponse = deserialize(
1041+
const body: DORADeploymentsListResponse = deserialize(
10401042
parse(await response.body.text(), contentType),
10411043
TypingInfo,
1042-
"DORAListResponse",
1044+
"DORADeploymentsListResponse",
10431045
"",
1044-
) as DORAListResponse;
1046+
) as DORADeploymentsListResponse;
10451047
return body;
10461048
}
10471049

@@ -1061,14 +1063,14 @@ export class DORAMetricsApiResponseProcessor {
10611063
*/
10621064
public async listDORAFailures(
10631065
response: ResponseContext,
1064-
): Promise<DORAListResponse> {
1066+
): Promise<DORAFailuresListResponse> {
10651067
const contentType = normalizeMediaType(response.headers["content-type"]);
10661068
if (response.httpStatusCode === 200) {
1067-
const body: DORAListResponse = deserialize(
1069+
const body: DORAFailuresListResponse = deserialize(
10681070
parse(await response.body.text(), contentType),
10691071
TypingInfo,
1070-
"DORAListResponse",
1071-
) as DORAListResponse;
1072+
"DORAFailuresListResponse",
1073+
) as DORAFailuresListResponse;
10721074
return body;
10731075
}
10741076
if (response.httpStatusCode === 400) {
@@ -1113,12 +1115,12 @@ export class DORAMetricsApiResponseProcessor {
11131115

11141116
// Work around for missing responses in specification, e.g. for petstore.yaml
11151117
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1116-
const body: DORAListResponse = deserialize(
1118+
const body: DORAFailuresListResponse = deserialize(
11171119
parse(await response.body.text(), contentType),
11181120
TypingInfo,
1119-
"DORAListResponse",
1121+
"DORAFailuresListResponse",
11201122
"",
1121-
) as DORAListResponse;
1123+
) as DORAFailuresListResponse;
11221124
return body;
11231125
}
11241126

@@ -1343,7 +1345,7 @@ export class DORAMetricsApi {
13431345
public getDORADeployment(
13441346
param: DORAMetricsApiGetDORADeploymentRequest,
13451347
options?: Configuration,
1346-
): Promise<DORAFetchResponse> {
1348+
): Promise<DORADeploymentFetchResponse> {
13471349
const requestContextPromise = this.requestFactory.getDORADeployment(
13481350
param.deploymentId,
13491351
options,
@@ -1364,7 +1366,7 @@ export class DORAMetricsApi {
13641366
public getDORAFailure(
13651367
param: DORAMetricsApiGetDORAFailureRequest,
13661368
options?: Configuration,
1367-
): Promise<DORAFetchResponse> {
1369+
): Promise<DORAFailureFetchResponse> {
13681370
const requestContextPromise = this.requestFactory.getDORAFailure(
13691371
param.failureId,
13701372
options,
@@ -1385,7 +1387,7 @@ export class DORAMetricsApi {
13851387
public listDORADeployments(
13861388
param: DORAMetricsApiListDORADeploymentsRequest,
13871389
options?: Configuration,
1388-
): Promise<DORAListResponse> {
1390+
): Promise<DORADeploymentsListResponse> {
13891391
const requestContextPromise = this.requestFactory.listDORADeployments(
13901392
param.body,
13911393
options,
@@ -1406,7 +1408,7 @@ export class DORAMetricsApi {
14061408
public listDORAFailures(
14071409
param: DORAMetricsApiListDORAFailuresRequest,
14081410
options?: Configuration,
1409-
): Promise<DORAListResponse> {
1411+
): Promise<DORAFailuresListResponse> {
14101412
const requestContextPromise = this.requestFactory.listDORAFailures(
14111413
param.body,
14121414
options,

services/dora_metrics/src/v2/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@ export {
1212
} from "./DORAMetricsApi";
1313

1414
export { APIErrorResponse } from "./models/APIErrorResponse";
15+
export { DORADeploymentFetchResponse } from "./models/DORADeploymentFetchResponse";
16+
export { DORADeploymentObject } from "./models/DORADeploymentObject";
17+
export { DORADeploymentObjectAttributes } from "./models/DORADeploymentObjectAttributes";
1518
export { DORADeploymentRequest } from "./models/DORADeploymentRequest";
1619
export { DORADeploymentRequestAttributes } from "./models/DORADeploymentRequestAttributes";
1720
export { DORADeploymentRequestData } from "./models/DORADeploymentRequestData";
1821
export { DORADeploymentResponse } from "./models/DORADeploymentResponse";
1922
export { DORADeploymentResponseData } from "./models/DORADeploymentResponseData";
23+
export { DORADeploymentsListResponse } from "./models/DORADeploymentsListResponse";
2024
export { DORADeploymentType } from "./models/DORADeploymentType";
21-
export { DORAEvent } from "./models/DORAEvent";
25+
export { DORAFailureFetchResponse } from "./models/DORAFailureFetchResponse";
2226
export { DORAFailureRequest } from "./models/DORAFailureRequest";
2327
export { DORAFailureRequestAttributes } from "./models/DORAFailureRequestAttributes";
2428
export { DORAFailureRequestData } from "./models/DORAFailureRequestData";
2529
export { DORAFailureResponse } from "./models/DORAFailureResponse";
2630
export { DORAFailureResponseData } from "./models/DORAFailureResponseData";
31+
export { DORAFailuresListResponse } from "./models/DORAFailuresListResponse";
2732
export { DORAFailureType } from "./models/DORAFailureType";
28-
export { DORAFetchResponse } from "./models/DORAFetchResponse";
2933
export { DORAGitInfo } from "./models/DORAGitInfo";
34+
export { DORAIncidentObject } from "./models/DORAIncidentObject";
35+
export { DORAIncidentObjectAttributes } from "./models/DORAIncidentObjectAttributes";
3036
export { DORAListDeploymentsRequest } from "./models/DORAListDeploymentsRequest";
3137
export { DORAListDeploymentsRequestAttributes } from "./models/DORAListDeploymentsRequestAttributes";
3238
export { DORAListDeploymentsRequestData } from "./models/DORAListDeploymentsRequestData";
@@ -35,7 +41,6 @@ export { DORAListFailuresRequest } from "./models/DORAListFailuresRequest";
3541
export { DORAListFailuresRequestAttributes } from "./models/DORAListFailuresRequestAttributes";
3642
export { DORAListFailuresRequestData } from "./models/DORAListFailuresRequestData";
3743
export { DORAListFailuresRequestDataType } from "./models/DORAListFailuresRequestDataType";
38-
export { DORAListResponse } from "./models/DORAListResponse";
3944
export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem";
4045
export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource";
4146
export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse";

services/dora_metrics/src/v2/models/DORAListResponse.ts renamed to services/dora_metrics/src/v2/models/DORADeploymentFetchResponse.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3-
import { DORAEvent } from "./DORAEvent";
3+
import { DORADeploymentObject } from "./DORADeploymentObject";
44

55
/**
6-
* Response for the DORA list endpoints.
6+
* Response for fetching a single deployment event.
77
*/
8-
export class DORAListResponse {
8+
export class DORADeploymentFetchResponse {
99
/**
10-
* The list of DORA events.
10+
* A DORA deployment event.
1111
*/
12-
"data"?: Array<DORAEvent>;
12+
"data"?: DORADeploymentObject;
1313
/**
1414
* A container for additional, undeclared properties.
1515
* This is a holder for any undeclared properties as specified with
@@ -27,7 +27,7 @@ export class DORAListResponse {
2727
static readonly attributeTypeMap: AttributeTypeMap = {
2828
data: {
2929
baseName: "data",
30-
type: "Array<DORAEvent>",
30+
type: "DORADeploymentObject",
3131
},
3232
additionalProperties: {
3333
baseName: "additionalProperties",
@@ -39,7 +39,7 @@ export class DORAListResponse {
3939
* @ignore
4040
*/
4141
static getAttributeTypeMap(): AttributeTypeMap {
42-
return DORAListResponse.attributeTypeMap;
42+
return DORADeploymentFetchResponse.attributeTypeMap;
4343
}
4444

4545
public constructor() {}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { DORADeploymentObjectAttributes } from "./DORADeploymentObjectAttributes";
4+
import { DORADeploymentType } from "./DORADeploymentType";
5+
6+
/**
7+
* A DORA deployment event.
8+
*/
9+
export class DORADeploymentObject {
10+
/**
11+
* The attributes of the deployment event.
12+
*/
13+
"attributes"?: DORADeploymentObjectAttributes;
14+
/**
15+
* The ID of the deployment event.
16+
*/
17+
"id"?: string;
18+
/**
19+
* JSON:API type for DORA deployment events.
20+
*/
21+
"type"?: DORADeploymentType;
22+
/**
23+
* A container for additional, undeclared properties.
24+
* This is a holder for any undeclared properties as specified with
25+
* the 'additionalProperties' keyword in the OAS document.
26+
*/
27+
"additionalProperties"?: { [key: string]: any };
28+
/**
29+
* @ignore
30+
*/
31+
"_unparsed"?: boolean;
32+
33+
/**
34+
* @ignore
35+
*/
36+
static readonly attributeTypeMap: AttributeTypeMap = {
37+
attributes: {
38+
baseName: "attributes",
39+
type: "DORADeploymentObjectAttributes",
40+
},
41+
id: {
42+
baseName: "id",
43+
type: "string",
44+
},
45+
type: {
46+
baseName: "type",
47+
type: "DORADeploymentType",
48+
},
49+
additionalProperties: {
50+
baseName: "additionalProperties",
51+
type: "{ [key: string]: any; }",
52+
},
53+
};
54+
55+
/**
56+
* @ignore
57+
*/
58+
static getAttributeTypeMap(): AttributeTypeMap {
59+
return DORADeploymentObject.attributeTypeMap;
60+
}
61+
62+
public constructor() {}
63+
}

0 commit comments

Comments
 (0)