Skip to content

WrapperGenerator: evaluate Humanizer (or similar) so singularization scales beyond the pilot modules #3689

Description

@Joywambui-maina

Problem

The singularizer in tools/WrapperGenerator/Singularizer.cs is a hand-written rule set
scoped to Graph path-segment vocabulary — irregulars (ChildrenChild), invariant
words (Windows), version-tagged segments (alerts_v2AlertV2). 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.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions