docs: alias drop-payload Object types and dedupe identical aliases#40651
Merged
yury-s merged 1 commit intomicrosoft:mainfrom May 5, 2026
Merged
docs: alias drop-payload Object types and dedupe identical aliases#40651yury-s merged 1 commit intomicrosoft:mainfrom
yury-s merged 1 commit intomicrosoft:mainfrom
Conversation
pavelfeldman
reviewed
May 5, 2026
| - `payload` <[Object]> | ||
| - alias: DropPayload | ||
| - `files` ?<[path]|[Array]<[path]>|[Object]|[Array]<[Object]>> | ||
| - alias: FilePayload |
Member
There was a problem hiding this comment.
I don't think we can use the same alias in multiple places, we rather need mixins to avoid issues.
Member
Author
There was a problem hiding this comment.
this would be a bigger refactoring unrelated to this roll as we already have this logic in other places too
Member
There was a problem hiding this comment.
I would not let this logic in if I was reviewing it, let's use this as an opportunity to fix it. Should be a 1 min job
pavelfeldman
approved these changes
May 5, 2026
yury-s
added a commit
to yury-s/playwright-java
that referenced
this pull request
May 6, 2026
Ports the following upstream client-side PRs: - microsoft/playwright#39767 - feat: Add `location()` to `WebError` - microsoft/playwright#39950 - feat: page version of toMatchAriaSnapshot - microsoft/playwright#40083 - feat(locator): add `description` option to getByRole - microsoft/playwright#40092 - feat(expect): support pseudo-element in toHaveCSS - microsoft/playwright#40159 - feat(tracing): add tracing.startHar / tracing.stopHar - microsoft/playwright#40196 - chore: remove deprecated `handle` option from exposeBinding - microsoft/playwright#40215 - feat(api): Locator.highlight({ style }) - microsoft/playwright#40219 - feat(api): Page.hideHighlight, Locator.hideHighlight, highlight() returns AutoCloseable - microsoft/playwright#40283 - feat(locator): add drop API for files and clipboard-like data - microsoft/playwright#40315 - feat(browser): Browser.onContext / offContext - microsoft/playwright#40341 - feat(browsercontext): mirror Page lifecycle events on BrowserContext - microsoft/playwright#40377 - feat(route): expose WebSocket subprotocols on WebSocketRoute - microsoft/playwright#40606 - feat(api): unify WebError and ConsoleMessage location - microsoft/playwright#40651 - docs: alias drop-payload Object types Protocol shape change for FrameExpectResult.received (now `{ value, ariaSnapshot }` instead of a bare SerializedValue) — updated AssertionsBase to unwrap it. Generator updates: added new types to relevant import lists; share topLevelTypes between the assertion and non-assertion generate runs so PseudoElement gets emitted into options/.
Adds the missing `alias: DropPayload` and `alias: FilePayload` annotations on the `Locator.drop` payload Object types so the language ports can use proper class names instead of generic ones. While at it, replace `alias-csharp: X` + `alias-java: X` pairs with a single `alias: X` (which the api parser maps to the `default` key) where the values are identical. Affected entries: `input-files`, `drop-payload`.
yury-s
added a commit
to yury-s/playwright-java
that referenced
this pull request
May 6, 2026
Ports the following upstream client-side PRs: - microsoft/playwright#39767 - feat: Add `location()` to `WebError` - microsoft/playwright#39950 - feat: page version of toMatchAriaSnapshot - microsoft/playwright#40083 - feat(locator): add `description` option to getByRole - microsoft/playwright#40092 - feat(expect): support pseudo-element in toHaveCSS - microsoft/playwright#40159 - feat(tracing): add tracing.startHar / tracing.stopHar - microsoft/playwright#40196 - chore: remove deprecated `handle` option from exposeBinding - microsoft/playwright#40215 - feat(api): Locator.highlight({ style }) - microsoft/playwright#40219 - feat(api): Page.hideHighlight, Locator.hideHighlight, highlight() returns AutoCloseable - microsoft/playwright#40283 - feat(locator): add drop API for files and clipboard-like data - microsoft/playwright#40315 - feat(browser): Browser.onContext / offContext - microsoft/playwright#40341 - feat(browsercontext): mirror Page lifecycle events on BrowserContext - microsoft/playwright#40377 - feat(route): expose WebSocket subprotocols on WebSocketRoute - microsoft/playwright#40606 - feat(api): unify WebError and ConsoleMessage location - microsoft/playwright#40651 - docs: alias drop-payload Object types Protocol shape change for FrameExpectResult.received (now `{ value, ariaSnapshot }` instead of a bare SerializedValue) — updated AssertionsBase to unwrap it. Generator updates: added new types to relevant import lists; share topLevelTypes between the assertion and non-assertion generate runs so PseudoElement gets emitted into options/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
## drop-payloadblock indocs/src/api/params.mdwas missing thelanguage alias annotations that
## input-filescarries, so language portsthat need a concrete type for the inline
[Object]fall back to ambiguousgenerated names (e.g. Java's generator was emitting
Files.java/Payload.javaduplicating the existing
FilePayloadand using a genericPayloadname).Adds:
alias: DropPayloadon the outer payload Object.alias: FilePayloadon the innerfilesfield's Object union.While at it, dedupe
alias-csharp: X+alias-java: Xpairs to a singlealias: Xwhere the values are identical (the api parser maps the barealias:to thedefaultkey, which language generators consume as afallback). Affects
input-filesand the newdrop-payloadblock.No api shape change — this only adds/normalizes type names for the inline
Object types.
Test plan
API_JSON_MODE=1 node utils/doclint/generateApiJson.js— parses cleanlylangAliases.defaultis present on
Locator.drop.payload, the innerfilesObject, andsetInputFiles.filesObject)