Skip to content

chore: generate api.json for codegen instead of reading it from the driver#3096

Closed
Skn0tt wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt/drop-api-json-from-driver
Closed

chore: generate api.json for codegen instead of reading it from the driver#3096
Skn0tt wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt/drop-api-json-from-driver

Conversation

@Skn0tt

@Skn0tt Skn0tt commented Jun 9, 2026

Copy link
Copy Markdown
Member

Python is the only Playwright port that consumes api.json. Until now the codegen read it out of the driver bundle via the hidden print-api-json driver CLI. This generates it directly in build_driver.sh (API_JSON_MODE=1 node generateApiJson.js) and stages it next to the per-platform bundles as driver/playwright-<sha>-api.json, so it survives upstream dropping api.json from the driver bundle.

  • build_driver.sh: generate and stage api.json; require it on the fast path.
  • documentation_provider.py: read the staged api.json file directly (drops the subprocess call to python -m playwright print-api-json).
  • update_api.sh: preflight build_driver.sh so the codegen input is staged.
  • ci.yml: carry the whole driver/ folder (bundles + api.json) in the shared artifact, excluding the playwright-src checkout.
  • Docs: CLAUDE.md, ROLLING.md, playwright-roll SKILL.md.

Follow-up to #3092 (build driver from source).

…river

Python is the only Playwright port that consumes api.json. Until now the
codegen read it out of the driver bundle via the hidden `print-api-json`
driver CLI. This generates it directly in build_driver.sh
(`API_JSON_MODE=1 node generateApiJson.js`) and stages it next to the
per-platform bundles as `driver/playwright-<sha>-api.json`, so it survives
upstream dropping api.json from the driver bundle.

- build_driver.sh: generate and stage api.json; require it on the fast path.
- documentation_provider.py: read the staged api.json file directly (drops
  the subprocess call to `python -m playwright print-api-json`).
- update_api.sh: preflight build_driver.sh so the codegen input is staged.
- ci.yml: carry the whole driver/ folder (bundles + api.json) in the
  shared artifact, excluding the playwright-src checkout.
- Docs: CLAUDE.md, ROLLING.md, playwright-roll SKILL.md.

Follow-up to microsoft#3092 (build driver from source).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Skn0tt Skn0tt requested a review from dgozman June 9, 2026 09:51
@Skn0tt

Skn0tt commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

doesn't really give us anything. if we want to improve things, let's mirror what .NET does and parse markdown docs directly.

@Skn0tt Skn0tt closed this Jun 9, 2026
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.

1 participant