From 9c46ef4ef5202a44602788cfb902308e82e8c2a9 Mon Sep 17 00:00:00 2001 From: Samuel Kuang Date: Mon, 4 Oct 2021 18:09:35 -0700 Subject: [PATCH] Fix Swagger correctness bugs. --- .../2021-03-01-preview/SourceControls.json | 16 +++++++++++- .../sourcecontrols/CreateSourceControl.json | 25 +++++++++++++++++-- .../sourcecontrols/GetSourceControlById.json | 12 ++++++++- .../sourcecontrols/GetSourceControls.json | 12 ++++++++- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/SourceControls.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/SourceControls.json index ad6b85d03e21..c3b926e9b2ec 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/SourceControls.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/SourceControls.json @@ -360,6 +360,12 @@ "description": "source control properties", "$ref": "#/definitions/SourceControlProperties", "x-ms-client-flatten": true + }, + "systemData": { + "description": "System data of Cluster resource", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "x-ms-client-flatten": true, + "readOnly": true } }, "type": "object" @@ -367,7 +373,7 @@ "SourceControlProperties": { "description": "Describes source control properties", "properties": { - "sourceControlId": { + "id": { "description": "The id (a Guid) of the source control", "type": "string" }, @@ -416,6 +422,14 @@ "description": "Branch name of repository.", "type": "string" }, + "displayUrl": { + "description": "Display url of repository.", + "type": "string" + }, + "deploymentLogsUrl": { + "description": "Url to access repository action logs.", + "type": "string" + }, "pathMapping": { "description": "Dictionary of source control content type and path mapping.", "items": { diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/CreateSourceControl.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/CreateSourceControl.json index 8d8f4e12007f..79dd88f02839 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/CreateSourceControl.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/CreateSourceControl.json @@ -19,6 +19,7 @@ "repository": { "url": "https://github.com/user/repo", "branch": "master", + "displayUrl": "https://github.com/user/repo", "pathMapping": [ { "contentType": "AnalyticRules", @@ -41,7 +42,7 @@ "type": "Microsoft.SecurityInsights/SourceControls", "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { - "sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a", + "id": "789e0c1f-4a3d-43ad-809c-e713b677b04a", "displayName": "My Source Control", "description": "this is a source control", "repoType": "Github", @@ -52,6 +53,8 @@ "repository": { "url": "https://github.com/user/repo", "branch": "master", + "displayUrl": "https://github.com/user/repo", + "deploymentLogsUrl": "https://github.com/user/repo/actions", "pathMapping": [ { "contentType": "AnalyticRules", @@ -63,6 +66,14 @@ } ] } + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" } } }, @@ -73,7 +84,7 @@ "type": "Microsoft.SecurityInsights/SourceControls", "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { - "sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a", + "id": "789e0c1f-4a3d-43ad-809c-e713b677b04a", "displayName": "My Source Control", "description": "this is a source control", "repoType": "Github", @@ -84,6 +95,8 @@ "repository": { "url": "https://github.com/user/repo", "branch": "master", + "displayUrl": "https://github.com/user/repo", + "deploymentLogsUrl": "https://github.com/user/repo/actions", "pathMapping": [ { "contentType": "AnalyticRules", @@ -95,6 +108,14 @@ } ] } + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" } } } diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControlById.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControlById.json index 395a39d110d5..104dfa44de50 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControlById.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControlById.json @@ -15,7 +15,7 @@ "type": "Microsoft.SecurityInsights/SourceControls", "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { - "sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a", + "id": "789e0c1f-4a3d-43ad-809c-e713b677b04a", "displayName": "My Source Control", "description": "this is a source control", "repoType": "Github", @@ -26,6 +26,8 @@ "repository": { "url": "https://github.com/user/repo", "branch": "master", + "displayUrl": "https://github.com/user/repo", + "deploymentLogsUrl": "https://github.com/user/repo/actions", "pathMapping": [ { "contentType": "AnalyticRules", @@ -37,6 +39,14 @@ } ] } + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" } } } diff --git a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControls.json b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControls.json index 2054c4c1b4ff..803179762039 100644 --- a/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControls.json +++ b/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/sourcecontrols/GetSourceControls.json @@ -16,7 +16,7 @@ "type": "Microsoft.SecurityInsights/SourceControls", "etag": "\"0300bf09-0000-0000-0000-5c37296e0000\"", "properties": { - "sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a", + "id": "789e0c1f-4a3d-43ad-809c-e713b677b04a", "displayName": "My Source Control", "description": "this is a source control", "repoType": "Github", @@ -27,6 +27,8 @@ "repository": { "url": "https://github.com/user/repo", "branch": "master", + "displayUrl": "https://github.com/user/repo", + "deploymentLogsUrl": "https://github.com/user/repo/actions", "pathMapping": [ { "contentType": "AnalyticRules", @@ -38,6 +40,14 @@ } ] } + }, + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2021-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-01-02T17:18:19.1234567Z" } } ]