Sobaner/wildcardlistener#10878
Conversation
|
Swagger: Azure/azure-rest-api-specs#7453 |
Please consider renaming to "HostName" or "HostNameList" |
The NRP and swagger for this name has already been in field and there are private preview customers onboarded on the property called HostNames. If I call it HostNames in Swagger and call it HostNameList in PS, doesn't that conflict? I would request you to let me go ahead with this name. Discussed it with program management team as well on the naming convention. |
It's not just our team's recommendation, but also PowerShell (the language) team's strongly encouraged development guideline to use singular parameter names. I understood your concern, but per the documentation, it does not tell me about recommendations about property field naming conventions, where I could also provide a single entry, as well as a list of entries. ApplicationGatewayHttpListener always had the HostName attribute, which is allowed to take only a single dns hostname. With customer ask, we are now supporting wildcard characters, as well as multiple hostnames per listener, which we did not want to add in the HostName field (as it has singular name), which is the reason we introduced another field named HostNames Even from PS perspective, I see that some other cmdlets, like Set-AzApplicationGatewayBackendAddressPool, which had "BackendIPAddresses" and "BackendFqdns", which are basically list of strings, which can allow one or more of those categories. Now, considering swagger getting approved, I expected this to be a valid naming convention for my use case, which is the reason for raising this PS review. Now, simply changing a name, as I have mentioned earlier means to change it in NRP, wait for release, change it in swagger and then finally change PS cmdlets, which would increase the go to market for this feature. Currently the PR is ready from my side, apart from few merge validations failing (not related I guess), apart from review. |
|
Hi @sobaner , thanks for the detailed explanation of the scenario, that is helpful. (BTW please don't edit-reply, it's hard to notice)
Here's why:
And you needn't worry -- this is not a breaking change in powershell, as array parameters can take a single object. |
|
More details on parameter naming convention: we only accept 2 types of plural names:
As of the counter examples you gave, they were probably checked in due to some historic information. |
|
@number213 - I have corrected the staticAnalyzer errors for my PR, but seems like something else from vpn is failing the PR - https://dev.azure.com/azure-sdk/public/_build/results?buildId=238898&view=logs&j=e1b7b984-9f58-529f-7c5a-f15f8e35cfa6&t=e8689ae8-b216-55f7-b207-4831f84ff98a&l=98 Is there a successful build in network-december branch ? |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
# Conflicts: # src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.cs
Sobaner/wildcardlistener
Description
Adding Support for HostNames in Application Gateway Http Listener Class
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added