Skip to content

Commit a1da376

Browse files
committed
PR Changes
1 parent eeacfb6 commit a1da376

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

src/LogicApp/LogicApp/Cmdlets/IntegrationAccount/NewAzureIntegrationAccountMapCommand.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
namespace Microsoft.Azure.Commands.LogicApp.Cmdlets
1616
{
17-
using System;
18-
using System.Management.Automation;
1917
using Microsoft.Azure.Commands.LogicApp.Utilities;
2018
using Microsoft.Azure.Management.Logic.Models;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2120
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2221
using ResourceManager.Common.ArgumentCompleters;
22+
using System;
23+
using System.Management.Automation;
2324

2425
/// <summary>
2526
/// Creates a new integration account map.
@@ -62,6 +63,7 @@ public class NewAzureIntegrationAccountMapCommand : LogicAppBaseCmdlet
6263

6364
[Parameter(Mandatory = false, HelpMessage = "The integration account map content type.")]
6465
[ValidateNotNullOrEmpty]
66+
[CmdletParameterBreakingChange("ContentType", ChangeDescription = Constants.DeprecatedContentTypeMessage)]
6567
public string ContentType { get; set; }
6668

6769
[Parameter(Mandatory = false, HelpMessage = "The integration account map metadata.",
@@ -90,10 +92,7 @@ public override void ExecuteCmdlet()
9092
this.MapDefinition = CmdletHelper.GetContentFromFile(this.TryResolvePath(this.MapFilePath));
9193
}
9294

93-
if (string.IsNullOrEmpty(this.ContentType))
94-
{
95-
this.ContentType = this.MapType.Equals("liquid", StringComparison.CurrentCultureIgnoreCase) ? "text/plain" : "application/xml";
96-
}
95+
this.ContentType = this.MapType.Equals("liquid", StringComparison.CurrentCultureIgnoreCase) ? "text/plain" : "application/xml";
9796

9897
this.WriteObject(IntegrationAccountClient.CreateIntegrationAccountMap(this.ResourceGroupName, integrationAccount.Name, this.MapName,
9998
new IntegrationAccountMap

src/LogicApp/LogicApp/Cmdlets/IntegrationAccount/UpdateAzureIntegrationAccountMapCommand.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414

1515
namespace Microsoft.Azure.Commands.LogicApp.Cmdlets
1616
{
17-
using System;
18-
using System.Management.Automation;
1917
using Microsoft.Azure.Commands.LogicApp.Utilities;
2018
using Microsoft.Azure.Management.Logic.Models;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2120
using Microsoft.WindowsAzure.Commands.Utilities.Common;
22-
using System.Globalization;
2321
using ResourceManager.Common.ArgumentCompleters;
22+
using System;
23+
using System.Globalization;
24+
using System.Management.Automation;
2425

2526
/// <summary>
2627
/// Updates the integration account map.
@@ -63,6 +64,7 @@ public class UpdateAzureIntegrationAccountMapCommand : LogicAppBaseCmdlet
6364

6465
[Parameter(Mandatory = false, HelpMessage = "The integration account map content type.")]
6566
[ValidateNotNullOrEmpty]
67+
[CmdletParameterBreakingChange("ContentType", ChangeDescription = Constants.DeprecatedContentTypeMessage)]
6668
public string ContentType { get; set; }
6769

6870
[Parameter(Mandatory = false, HelpMessage = "The integration account map metadata.",

src/LogicApp/LogicApp/Utilities/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,7 @@ public class Constants
4646
public const string IsAcknowledgementSessionIdSuffix = "-ACK";
4747

4848
public const string NoAgreementTypeParameterWarningMessage = "By default, you are using the X12 agreement type. Please provide a value for AgreementType if you would like to specify the agreement type. Possible values are X12 and Edifact.";
49+
50+
public const string DeprecatedContentTypeMessage = "ContentType is being deprecated without being replaced. It will be inferred from MapType";
4951
}
5052
}

tools/StaticAnalysis/Exceptions/Az.LogicApp/BreakingChangeIssues.csv

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@
4646
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureLogicAppTriggerCommand","Get-AzLogicAppTrigger","0","3000","The type of property 'State' of type 'Microsoft.Azure.Management.Logic.Models.WorkflowTrigger' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowState]' to 'System.String'.","Change the type of property 'State' back to 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowState]'."
4747
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureLogicAppTriggerCommand","Get-AzLogicAppTrigger","0","3000","The type of property 'Status' of type 'Microsoft.Azure.Management.Logic.Models.WorkflowTrigger' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]'."
4848
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureLogicAppTriggerCommand","Get-AzLogicAppTrigger","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.Management.Logic.Models.WorkflowTrigger' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowTriggerProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowTriggerProvisioningState]'."
49-
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureLogicAppTriggerHistoryCommand","Get-AzLogicAppTriggerHistory","0","3000","The type of property 'Status' of type 'Microsoft.Azure.Management.Logic.Models.WorkflowTriggerHistory' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]'."
49+
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.GetAzureLogicAppTriggerHistoryCommand","Get-AzLogicAppTriggerHistory","0","3000","The type of property 'Status' of type 'Microsoft.Azure.Management.Logic.Models.WorkflowTriggerHistory' has changed from 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]' to 'System.String'.","Change the type of property 'Status' back to 'System.Nullable`1[Microsoft.Azure.Management.Logic.Models.WorkflowStatus]'."
50+
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.NewAzureIntegrationAccountCommand","New-AzIntegrationAccount","0","2050","A validate set has been added for parameter 'Sku' for cmdlet 'New-AzIntegrationAccount'.","Remove the validate set from parameter 'Sku'."
51+
"Microsoft.Azure.PowerShell.Cmdlets.LogicApp.dll","Microsoft.Azure.Commands.LogicApp.Cmdlets.UpdateAzureIntegrationAccountCommand","Set-AzIntegrationAccount","0","2050","A validate set has been added for parameter 'Sku' for cmdlet 'Set-AzIntegrationAccount'.","Remove the validate set from parameter 'Sku'."

0 commit comments

Comments
 (0)