Azure / autorest.powershell

AutoRest PowerShell Generator
MIT License
111 stars 76 forks source link

do not append action for post viaidentity #1204

Closed VeryEarly closed 11 months ago

VeryEarly commented 11 months ago

fixing #1198

API List=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listAllTrafficFilters" was treated as list operation, thus the list viaidentity cmdlet append action 'listAllTrafficFilters' for identity '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}'

if (MonitorInputObject?.Id != null)
{
    this.MonitorInputObject.Id += "/listAllTrafficFilters";
    await this.Client.AllTrafficFiltersListViaIdentity(MonitorInputObject.Id, onOk, onDefault, this, Pipeline);
}

Add check for list operations, if it's post API, append nothing to the identity.