Skip to content

docs: alias bullets for port-specific Object struct names#40122

Merged
yury-s merged 3 commits intomicrosoft:mainfrom
yury-s:docs-port-aliases
Apr 9, 2026
Merged

docs: alias bullets for port-specific Object struct names#40122
yury-s merged 3 commits intomicrosoft:mainfrom
yury-s:docs-port-aliases

Conversation

@yury-s
Copy link
Copy Markdown
Member

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

Summary

  • Replace [Object=Name] with - alias: / - alias-LANG: child bullets so language ports can override the struct name independently.
  • Add alias-java entries for every top-level Object/function type the Java port currently customizes via its hardcoded customTypeNames map and toTitle(parent.jsonName) inference, so the Java generator can be simplified after the next roll.

C# generator output is byte-identical to baseline.

yury-s added 2 commits April 8, 2026 15:59
Replace the `[Object=Name]` syntax for naming generated structs in language
ports with `- alias:` / `- alias-LANG:` child bullets, so the default alias
applies to all ports while individual languages can override it.
So the Java generator can drop its hardcoded customTypeNames map and
toTitle(parent.jsonName) inference and read langAliases.java from the
api.json instead.

Also extend Type.parse to attach langAliases to non-Object types so the
exposeBinding/exposeFunction function callbacks can carry an alias.
@yury-s yury-s requested a review from dgozman April 9, 2026 03:24
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Test results for "tests 1"

1 failed
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:395 › should copy network request @macos-latest-node20

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:481 › screencast › should capture static page in persistent context @smoke `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`

39187 passed, 846 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Test results for "MCP"

6468 passed, 383 skipped


Merge workflow run.

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