Investigate automatic singularization of function cmdlet nouns in the v3 generator
維護者通常 7 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with the function-segment branch in tools/WrapperGenerator/CmdletNaming.cs, which adds the operation noun without the singularization applied to resource segments, and compare it with the Reports overrides in src/Reports/wrapper/Reports_cmdletConfigurations.cs. Survey how the v1.0 and beta naming data (parity-renames.v1.0.json and its beta counterpart) treat function nouns across the corpus. Done means a written rule or a list of deliberate exceptions, plus naming regression tests, and no change to the wire API, HTTP routes or builders.
由索引模型根據 Issue 內容生成。
描述
Is your feature request related to a problem? Please describe the problem.
The v3 WrapperGenerator automatically singularizes resource path segments, but its action/function-segment branch adds the parsed operation noun directly, bypassing resource singularization. As a result, function-derived PowerShell nouns can retain plural endings unless an oracle-derived rename or curated module configuration corrects them.
Example from the Reports directive migration (#3870):
GET /reports/managedDeviceEnrollmentTopFailures()
Structural command: Get-MgReportManagedDeviceEnrollmentTopFailures
Intended command: Get-MgReportManagedDeviceEnrollmentTopFailure
The existing shared Reports.md directive specifies the singular ReportManagedDeviceEnrollmentTopFailure noun. Before this migration, v1.0 already received that name from an explicit entry in parity-renames.v1.0.json, while beta retained the structural plural because the committed derived naming data is v1.0-only. The shared Reports configuration now preserves the intended singular name in both profiles.
Describe the solution you'd like.
Investigate whether function-derived cmdlet nouns should be singularized automatically, consistently with resource-derived nouns, rather than requiring individual overrides for cases such as TopFailures → TopFailure.
Determine the correct rule before implementing it:
- Evaluate singularizing the appropriate noun portion of a function name, without rewriting the actual API function, HTTP route, Kiota builder, or wire parameters.
- Review corpus-wide effects in both v1.0 and beta, including meaningful plural names, irregular nouns, acronyms, parameterized overload suffixes, and possible command-name collisions.
- Check compatibility with published command names, shared AutoRest directive intent, and existing curated/oracle-derived overrides. Do not remove needed overrides merely because one example is addressed.
- Add naming regression coverage and document any deliberate exceptions if a general rule is adopted.
This issue is investigation only, not approval for a naming sweep. Whether action names need a similar rule should be assessed separately rather than assumed.
Additional context?
Raised during review of #3870. The user noted that function nouns should probably be singularized automatically and requested an issue marked as needing investigation.
Relevant source at the reviewed Reports PR head:
- Function-segment branch in CmdletNaming.cs
- Reports shared noun overrides
- Existing v1.0 oracle-derived TopFailure rename
No generator behavior or Reports configuration is changed as part of filing this issue.
- 主要語言
- C#
- 星號
- 911
- 分支
- 236
- 平均合併
- 9 天 18 小時
- 30 天內合併 PR
- 33
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoftgraph/msgraph-sdk-powershell 的其他 Issue
-
DirectoryObjects: drop the publicKeyInfrastructureRoot tag from the module mapping (v2)可能已有人在做 @gavinbarron 於 8 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
microsoftgraph/msgraph-sdk-powershell#3752 · 1 個 reaction · 已指派 2 人 ·
維護者通常 7 天內回覆
-
status:waiting-for-triage type:bug
難度 3/5 1-2 天 新手友好度 54/100
microsoftgraph/msgraph-sdk-powershell#3918 ·
維護者通常 7 天內回覆
-
難度 4/5 3-5 天 新手友好度 56/100
microsoftgraph/msgraph-sdk-powershell#3917 ·
維護者通常 7 天內回覆
-
[v3 wrappers] Support arbitrary optional query parameters可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉status:waiting-for-triage type:feature
難度 5/5 一週以上 新手友好度 35/100
microsoftgraph/msgraph-sdk-powershell#3897 ·
維護者通常 7 天內回覆
-
Tracking for V3 Upgrade可能已有人在做 @ramsessanchez 於 22 天前認領。 未關閉type:epic
microsoftgraph/msgraph-sdk-powershell#3874 · 已指派 1 人 ·
維護者通常 7 天內回覆
查看 microsoftgraph/msgraph-sdk-powershell 的全部 Issue
相似的 Issue
-
🐛 bug 🕒 low effort good first issue
難度 2/5 1-3 小時 新手友好度 85/100
guibranco/Sankhya-SDK-dotnet#654 ·
維護者通常 1 天內回覆
-
a-corriger bug
難度 2/5 1-3 小時 新手友好度 86/100
christian-raj/S-Aloha#340 ·
-
遇到超大文件会卡住未關閉
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 4 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
microsoft/microsoft-ui-reactor#1626 ·
維護者通常 1 天內回覆
-
Triage:Untriaged Type:Bug
難度 2/5 1-3 小時 新手友好度 79/100