Open markwahl-msft opened 3 years ago
+1 to this. Also, it would be nice for AutoREST.PowerShell to expose EnglishPluralizationService
as a directive or config that customers can use to include and exclude plurals. Essentially something like this but as a directive/config: https://github.com/Azure/autorest.powershell/blob/67d99227e4cb8b03ca3168731bcbe23ae14d35e5/powershell/internal/name-inferrer.ts#L12
The Azure AD feature Terms of Use has as one of its resource surfaced in OData, agreement. It appears in CSDL as
and YAML as
with operations like
I would expect that by default cmdlets generated for this to be named like
Get-MgIdentityGovernanceTermsOfUseAgreement
. This is because there is a Collection() type of a singularagreement
that has a pluralagreements
, so it makes sense for that to be represented in PSh cmdlet and type names asAgreement
. Note there is noterm
, 'terms' ortermofuse
in this service's endpoint.However it appears autorest.powershell is incorrectly attempting to singularize inside of the token
termsOfUse
as well, rather than treatingtermsOfUse
as a token. As a result when generating PSh from this, I see generated cmdlet names likeGet-MgIdentityGovernanceTerm
andGet-MgIdentityGovernanceTermOfUseAgreement
. For example,GetMgIdentityGovernanceTerm_Get.cs
hasand
GetMgIdentityGovernanceTermOfUseAgreement_Get.cs
It is incorrect for autorest.powershell to
since 'term' or 'terms' are not entities, types or paths in the service.