Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating PUT operation requirements for SourceControls and SourceControlSyncJobs, updating streams’ value property, and updating examples. #3580

Merged
merged 5 commits into from
Aug 6, 2018
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"autoSync": true,
"publishRunbook": true,
"sourceType": "VsoGit",
"securityToken": "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567",
"securityToken": {
"accessToken":"3a326f7a0dcd343ea58fee21f2fd5fb4c1234567",
"tokenType": "PersonalAccessToken"
},
"description": "my description"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"folderPath": "/folderOne/folderTwo",
"autoSync": true,
"publishRunbook": true,
"securityToken": "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567",
"securityToken": {
"accessToken":"3a326f7a0dcd343ea58fee21f2fd5fb4c1234567",
"tokenType": "PersonalAccessToken"
},
"description": "my description"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"body": {
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a1a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a1a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a1a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand All @@ -25,7 +25,7 @@
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand All @@ -36,7 +36,7 @@
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a3a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a3a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a3a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand All @@ -47,7 +47,7 @@
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a4a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a4a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a4a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand All @@ -58,7 +58,7 @@
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a5a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a5a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a5a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"body": {
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"properties": {
"syncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
"time": "2017-03-28T23:14:26.903+00:00",
"streamType": "Error",
"streamText": "New-AzureAffinityGroup : Cannot validate argument on parameter 'Location'. The argument is null or empty. Provide an \r\nargument that is not null or empty, and then try the command again.\r\nAt DatabaseExportImport1fba401e-0:69 char:69\r\n+ \r\n + CategoryInfo : InvalidData: . . . .",
"value": "{ 'Exception': {'Message':'System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Location'. The argument is null or empty . . .} }"
"value": {
"Exception": {
"Message":"System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Location'. The argument is null or empty . . .} }"
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@
},
"securityToken": {
"type": "string",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is a complex object - please remove the "type":"string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

"description": "Gets or sets the authorization token for the repo of the source control."
"description": "Gets or sets the authorization token for the repo of the source control.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid terminology like "Gets or sets" as this isn't idiomatic for all generated SDK languages. Just stick with the description: "The authorization token for the repo of the source control."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion. Fixed.

"$ref": "#/definitions/SourceControlSecurityTokenProperties"
},
"description": {
"type": "string",
Expand Down Expand Up @@ -493,8 +494,8 @@
},
"securityToken": {
"type": "string",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is a complex object - please remove the "type":"string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that, thanks. Fixed.

"maxLength": 1024,
"description": "Gets or sets the authorization token for the repo of the source control."
"description": "Gets or sets the authorization token for the repo of the source control.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid terminology like "Gets or sets" as this isn't idiomatic for all generated SDK languages. Just stick with the description. This also applies to the other descriptions below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

"$ref": "#/definitions/SourceControlSecurityTokenProperties"
},
"description": {
"type": "string",
Expand All @@ -503,6 +504,32 @@
}
},
"description": "The properties of the create source control operation."
},
"SourceControlSecurityTokenProperties": {
"properties":{
"accessToken":{
"type":"string",
"maxLength":1024,
"description":"Gets or sets the access token."
},
"refreshToken":{
"type":"string",
"maxLength":1024,
"description":"Gets or sets the refresh token."
},
"tokenType":{
"type": "string",
"description": "The token type. Must be either PersonalAccessToken or Oauth.",
"enum": [
"PersonalAccessToken",
"Oauth"
],
"x-ms-enum": {
"name": "tokenType",
"modelAsString": true
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,13 @@
"properties": {
"commitId": {
"type": "string",
"description": "Sets the commit id of the source control sync job."
"description": "Sets the commit id of the source control sync job. If not syncing to a commitId, enter an empty string.",
"minLength": 0
}
},
"required": [
"commitId"
],
"description": "Definition of create source control sync job properties."
},
"SourceControlSyncJobById": {
Expand All @@ -281,7 +285,7 @@
},
"SourceControlSyncJobByIdProperties": {
"properties": {
"syncJobId": {
"sourceControlSyncJobId": {
"type": "string",
"description": "Gets the source control sync job id."
},
Expand Down Expand Up @@ -365,7 +369,7 @@
},
"SourceControlSyncJobProperties": {
"properties": {
"syncJobId": {
"sourceControlSyncJobId": {
"type": "string",
"description": "Gets the source control sync job id."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,11 @@
"description": "Gets the text of the sync job stream."
},
"value": {
"type": "string",
"description": "Gets the value of the sync job stream."
"type": "object",
"additionalProperties": {
"type": "object"
},
"description": "Gets or sets the values of the job stream."
}
},
"description": "Definition of source control sync job stream by id properties."
Expand Down