Skip to content

chore: use langAliases from api.json in api generator#1907

Merged
yury-s merged 1 commit intomicrosoft:mainfrom
yury-s:api-generator-use-lang-aliases
Apr 9, 2026
Merged

chore: use langAliases from api.json in api generator#1907
yury-s merged 1 commit intomicrosoft:mainfrom
yury-s:api-generator-use-lang-aliases

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Apr 9, 2026

Summary

  • Read langAliases.java (with fallback to the language-agnostic default) from api.json in ApiGenerator to drive Java type names for Object and function types.
  • Drop the hand-maintained customTypeNames map (28 entries: ClientCertificate, Cookie, HttpHeader, SelectOption, FilePayload, Position) and the hardcoded BindingCallback/FunctionCallback switch — these are all expressed as aliases in api.json now.
  • Two classes are renamed because the upstream docs only declare a language-agnostic alias: for them: Bind -> BindResult, PausedDetails -> DebuggerPausedDetails. Impl and test references are updated accordingly.

This follows the upstream playwright change that introduced the alias bullets (microsoft/playwright#40122).

The upstream playwright repo replaced the `[Object=Name]` struct
naming syntax with explicit `alias-java`/`alias-csharp`/`alias` bullets
on type definitions. Read those aliases in ApiGenerator and drop the
hand-maintained `customTypeNames` map and the function-callback switch
that previously hardcoded the same names. Falling back to the
language-agnostic `alias` (matching the dotnet generator's
`csharp || default` pattern) renames `Bind` to `BindResult` and
`PausedDetails` to `DebuggerPausedDetails`; impl and test files are
updated accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yury-s yury-s merged commit 7dbd6ca into microsoft:main Apr 9, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants