Skip to content

Commit 0625f5b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Use repository_id in DORA deployment GET docs (#3608)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f45cdcd commit 0625f5b

File tree

5 files changed

+80
-8
lines changed

5 files changed

+80
-8
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18654,7 +18654,7 @@ components:
1865418654
finished_at: 1693491984000000000
1865518655
git:
1865618656
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
18657-
repository_url: https://github.com/organization/example-repository
18657+
repository_id: github.com/organization/example-repository
1865818658
service: shopist
1865918659
started_at: 1693491974000000000
1866018660
team: backend
@@ -18685,7 +18685,7 @@ components:
1868518685
format: int64
1868618686
type: integer
1868718687
git:
18688-
$ref: '#/components/schemas/DORAGitInfo'
18688+
$ref: '#/components/schemas/DORAGitInfoResponse'
1868918689
service:
1869018690
description: Service name.
1869118691
example: shopist
@@ -18896,7 +18896,7 @@ components:
1889618896
finished_at: 1693491984000000000
1889718897
git:
1889818898
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
18899-
repository_url: https://github.com/organization/example-repository
18899+
repository_id: github.com/organization/example-repository
1890018900
service: shopist
1890118901
started_at: 1693491974000000000
1890218902
team: backend
@@ -18911,7 +18911,7 @@ components:
1891118911
finished_at: 1693492084000000000
1891218912
git:
1891318913
commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599
18914-
repository_url: https://github.com/organization/api-service
18914+
repository_id: github.com/organization/api-service
1891518915
service: api-service
1891618916
started_at: 1693492074000000000
1891718917
team: backend
@@ -19085,6 +19085,17 @@ components:
1908519085
- repository_url
1908619086
- commit_sha
1908719087
type: object
19088+
DORAGitInfoResponse:
19089+
description: Git info returned by DORA Metrics events.
19090+
properties:
19091+
commit_sha:
19092+
$ref: '#/components/schemas/GitCommitSHA'
19093+
repository_id:
19094+
$ref: '#/components/schemas/GitRepositoryID'
19095+
required:
19096+
- repository_id
19097+
- commit_sha
19098+
type: object
1908819099
DORAIncidentObject:
1908919100
description: A DORA incident event.
1909019101
example:
@@ -28632,6 +28643,10 @@ components:
2863228643
example: 66adc9350f2cc9b250b69abddab733dd55e1a588
2863328644
pattern: ^[a-fA-F0-9]{40,}$
2863428645
type: string
28646+
GitRepositoryID:
28647+
description: Git Repository ID
28648+
example: github.com/organization/example-repository
28649+
type: string
2863528650
GitRepositoryURL:
2863628651
description: Git Repository URL
2863728652
example: https://github.com/organization/example-repository

services/dora_metrics/src/v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export { DORAFailureResponseData } from "./models/DORAFailureResponseData";
3838
export { DORAFailuresListResponse } from "./models/DORAFailuresListResponse";
3939
export { DORAFailureType } from "./models/DORAFailureType";
4040
export { DORAGitInfo } from "./models/DORAGitInfo";
41+
export { DORAGitInfoResponse } from "./models/DORAGitInfoResponse";
4142
export { DORAIncidentObject } from "./models/DORAIncidentObject";
4243
export { DORAIncidentObjectAttributes } from "./models/DORAIncidentObjectAttributes";
4344
export { DORAListDeploymentsRequest } from "./models/DORAListDeploymentsRequest";

services/dora_metrics/src/v2/models/DORADeploymentObjectAttributes.ts

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

3-
import { DORAGitInfo } from "./DORAGitInfo";
3+
import { DORAGitInfoResponse } from "./DORAGitInfoResponse";
44

55
/**
66
* The attributes of the deployment event.
@@ -19,9 +19,9 @@ export class DORADeploymentObjectAttributes {
1919
*/
2020
"finishedAt": number;
2121
/**
22-
* Git info for DORA Metrics events.
22+
* Git info returned by DORA Metrics events.
2323
*/
24-
"git"?: DORAGitInfo;
24+
"git"?: DORAGitInfoResponse;
2525
/**
2626
* Service name.
2727
*/
@@ -69,7 +69,7 @@ export class DORADeploymentObjectAttributes {
6969
},
7070
git: {
7171
baseName: "git",
72-
type: "DORAGitInfo",
72+
type: "DORAGitInfoResponse",
7373
},
7474
service: {
7575
baseName: "service",
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Git info returned by DORA Metrics events.
5+
*/
6+
export class DORAGitInfoResponse {
7+
/**
8+
* Git Commit SHA.
9+
*/
10+
"commitSha": string;
11+
/**
12+
* Git Repository ID
13+
*/
14+
"repositoryId": string;
15+
/**
16+
* A container for additional, undeclared properties.
17+
* This is a holder for any undeclared properties as specified with
18+
* the 'additionalProperties' keyword in the OAS document.
19+
*/
20+
"additionalProperties"?: { [key: string]: any };
21+
/**
22+
* @ignore
23+
*/
24+
"_unparsed"?: boolean;
25+
26+
/**
27+
* @ignore
28+
*/
29+
static readonly attributeTypeMap: AttributeTypeMap = {
30+
commitSha: {
31+
baseName: "commit_sha",
32+
type: "string",
33+
required: true,
34+
},
35+
repositoryId: {
36+
baseName: "repository_id",
37+
type: "string",
38+
required: true,
39+
},
40+
additionalProperties: {
41+
baseName: "additionalProperties",
42+
type: "{ [key: string]: any; }",
43+
},
44+
};
45+
46+
/**
47+
* @ignore
48+
*/
49+
static getAttributeTypeMap(): AttributeTypeMap {
50+
return DORAGitInfoResponse.attributeTypeMap;
51+
}
52+
53+
public constructor() {}
54+
}

services/dora_metrics/src/v2/models/TypingInfo.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { DORAFailureResponse } from "./DORAFailureResponse";
2222
import { DORAFailureResponseData } from "./DORAFailureResponseData";
2323
import { DORAFailuresListResponse } from "./DORAFailuresListResponse";
2424
import { DORAGitInfo } from "./DORAGitInfo";
25+
import { DORAGitInfoResponse } from "./DORAGitInfoResponse";
2526
import { DORAIncidentObject } from "./DORAIncidentObject";
2627
import { DORAIncidentObjectAttributes } from "./DORAIncidentObjectAttributes";
2728
import { DORAListDeploymentsRequest } from "./DORAListDeploymentsRequest";
@@ -67,6 +68,7 @@ export const TypingInfo: ModelTypingInfo = {
6768
DORAFailureResponseData: DORAFailureResponseData,
6869
DORAFailuresListResponse: DORAFailuresListResponse,
6970
DORAGitInfo: DORAGitInfo,
71+
DORAGitInfoResponse: DORAGitInfoResponse,
7072
DORAIncidentObject: DORAIncidentObject,
7173
DORAIncidentObjectAttributes: DORAIncidentObjectAttributes,
7274
DORAListDeploymentsRequest: DORAListDeploymentsRequest,

0 commit comments

Comments
 (0)