Problem
The singularizer in tools/WrapperGenerator/Singularizer.cs is a hand-written rule set
scoped to Graph path-segment vocabulary — irregulars (Children → Child), invariant
words (Windows), version-tagged segments (alerts_v2 → AlertV2). Every rule exists
because a shipping cmdlet name needed it, and a missing rule is only discovered when the
parity gate fails on a new module. That works at 15 pilot modules, but the rule count
scales with vocabulary as generation expands toward all ~40 modules.
Possible path forward
- Evaluate Humanizer (or similar) as the base
inflector, keeping the existing checked-in override layer on top for Graph-specific
behavior.
- Hard constraint: published cmdlet names must stay byte-identical. Some shipped names
are deliberately non-standard English (onPremisesSynchronization →
OnPremiseSynchronization) because AutoRest singularized every camelCase word — a
correct English inflector will disagree with shipped names in places, so the override
table must always win.
- Acceptance test: swap the library in behind the current interface and run
tools/Compare-WrapperCmdletNames.ps1 across all pilot modules; adopt only on a
zero-diff result.
- Also measure whether the library reduces the override table or grows it — if
overrides grow, the dependency isn't paying for itself.
Problem
The singularizer in
tools/WrapperGenerator/Singularizer.csis a hand-written rule setscoped to Graph path-segment vocabulary — irregulars (
Children→Child), invariantwords (
Windows), version-tagged segments (alerts_v2→AlertV2). Every rule existsbecause a shipping cmdlet name needed it, and a missing rule is only discovered when the
parity gate fails on a new module. That works at 15 pilot modules, but the rule count
scales with vocabulary as generation expands toward all ~40 modules.
Possible path forward
inflector, keeping the existing checked-in override layer on top for Graph-specific
behavior.
are deliberately non-standard English (
onPremisesSynchronization→OnPremiseSynchronization) because AutoRest singularized every camelCase word — acorrect English inflector will disagree with shipped names in places, so the override
table must always win.
tools/Compare-WrapperCmdletNames.ps1across all pilot modules; adopt only on azero-diff result.
overrides grow, the dependency isn't paying for itself.