Skip to content

Commit cbce56c

Browse files
Fix Swagger correctness bugs. (#16280)
1 parent 3e4feab commit cbce56c

File tree

4 files changed

+60
-5
lines changed

4 files changed

+60
-5
lines changed

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/SourceControls.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,20 @@
360360
"description": "source control properties",
361361
"$ref": "#/definitions/SourceControlProperties",
362362
"x-ms-client-flatten": true
363+
},
364+
"systemData": {
365+
"description": "System data of Cluster resource",
366+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
367+
"x-ms-client-flatten": true,
368+
"readOnly": true
363369
}
364370
},
365371
"type": "object"
366372
},
367373
"SourceControlProperties": {
368374
"description": "Describes source control properties",
369375
"properties": {
370-
"sourceControlId": {
376+
"id": {
371377
"description": "The id (a Guid) of the source control",
372378
"type": "string"
373379
},
@@ -416,6 +422,14 @@
416422
"description": "Branch name of repository.",
417423
"type": "string"
418424
},
425+
"displayUrl": {
426+
"description": "Display url of repository.",
427+
"type": "string"
428+
},
429+
"deploymentLogsUrl": {
430+
"description": "Url to access repository action logs.",
431+
"type": "string"
432+
},
419433
"pathMapping": {
420434
"description": "Dictionary of source control content type and path mapping.",
421435
"items": {

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/CreateSourceControl.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"repository": {
2020
"url": "https://github.com/user/repo",
2121
"branch": "master",
22+
"displayUrl": "https://github.com/user/repo",
2223
"pathMapping": [
2324
{
2425
"contentType": "AnalyticRules",
@@ -41,7 +42,7 @@
4142
"type": "Microsoft.SecurityInsights/SourceControls",
4243
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
4344
"properties": {
44-
"sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
45+
"id": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
4546
"displayName": "My Source Control",
4647
"description": "this is a source control",
4748
"repoType": "Github",
@@ -52,6 +53,8 @@
5253
"repository": {
5354
"url": "https://github.com/user/repo",
5455
"branch": "master",
56+
"displayUrl": "https://github.com/user/repo",
57+
"deploymentLogsUrl": "https://github.com/user/repo/actions",
5558
"pathMapping": [
5659
{
5760
"contentType": "AnalyticRules",
@@ -63,6 +66,14 @@
6366
}
6467
]
6568
}
69+
},
70+
"systemData": {
71+
"createdBy": "user1",
72+
"createdByType": "User",
73+
"createdAt": "2021-01-01T17:18:19.1234567Z",
74+
"lastModifiedBy": "user2",
75+
"lastModifiedByType": "User",
76+
"lastModifiedAt": "2021-01-02T17:18:19.1234567Z"
6677
}
6778
}
6879
},
@@ -73,7 +84,7 @@
7384
"type": "Microsoft.SecurityInsights/SourceControls",
7485
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
7586
"properties": {
76-
"sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
87+
"id": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
7788
"displayName": "My Source Control",
7889
"description": "this is a source control",
7990
"repoType": "Github",
@@ -84,6 +95,8 @@
8495
"repository": {
8596
"url": "https://github.com/user/repo",
8697
"branch": "master",
98+
"displayUrl": "https://github.com/user/repo",
99+
"deploymentLogsUrl": "https://github.com/user/repo/actions",
87100
"pathMapping": [
88101
{
89102
"contentType": "AnalyticRules",
@@ -95,6 +108,14 @@
95108
}
96109
]
97110
}
111+
},
112+
"systemData": {
113+
"createdBy": "user1",
114+
"createdByType": "User",
115+
"createdAt": "2021-01-01T17:18:19.1234567Z",
116+
"lastModifiedBy": "user2",
117+
"lastModifiedByType": "User",
118+
"lastModifiedAt": "2021-01-02T17:18:19.1234567Z"
98119
}
99120
}
100121
}

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControlById.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "Microsoft.SecurityInsights/SourceControls",
1616
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
1717
"properties": {
18-
"sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
18+
"id": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
1919
"displayName": "My Source Control",
2020
"description": "this is a source control",
2121
"repoType": "Github",
@@ -26,6 +26,8 @@
2626
"repository": {
2727
"url": "https://github.com/user/repo",
2828
"branch": "master",
29+
"displayUrl": "https://github.com/user/repo",
30+
"deploymentLogsUrl": "https://github.com/user/repo/actions",
2931
"pathMapping": [
3032
{
3133
"contentType": "AnalyticRules",
@@ -37,6 +39,14 @@
3739
}
3840
]
3941
}
42+
},
43+
"systemData": {
44+
"createdBy": "user1",
45+
"createdByType": "User",
46+
"createdAt": "2021-01-01T17:18:19.1234567Z",
47+
"lastModifiedBy": "user2",
48+
"lastModifiedByType": "User",
49+
"lastModifiedAt": "2021-01-02T17:18:19.1234567Z"
4050
}
4151
}
4252
}

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControls.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"type": "Microsoft.SecurityInsights/SourceControls",
1717
"etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"",
1818
"properties": {
19-
"sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
19+
"id": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
2020
"displayName": "My Source Control",
2121
"description": "this is a source control",
2222
"repoType": "Github",
@@ -27,6 +27,8 @@
2727
"repository": {
2828
"url": "https://github.com/user/repo",
2929
"branch": "master",
30+
"displayUrl": "https://github.com/user/repo",
31+
"deploymentLogsUrl": "https://github.com/user/repo/actions",
3032
"pathMapping": [
3133
{
3234
"contentType": "AnalyticRules",
@@ -38,6 +40,14 @@
3840
}
3941
]
4042
}
43+
},
44+
"systemData": {
45+
"createdBy": "user1",
46+
"createdByType": "User",
47+
"createdAt": "2021-01-01T17:18:19.1234567Z",
48+
"lastModifiedBy": "user2",
49+
"lastModifiedByType": "User",
50+
"lastModifiedAt": "2021-01-02T17:18:19.1234567Z"
4151
}
4252
}
4353
]

0 commit comments

Comments
 (0)