Add a step to the Python TypeSpec emitter to automatically generate an api.md file as part of the emitter pipeline.
Prerequirements:
Scope
- Generate api.md.
- By default, it should be generated, but allow for an opt‑out.
- Any apistubgen errors should warn and continue, and NOT block.
- The api.md file should NOT be included in the whl (exclude from pyproject.toml/setup.py).
Proposed implementation
Extend the Python emitter pipeline from:
preprocess → generate → format (black)
to:
preprocess → generate → format (black) → apistubgen → api.md
- Run the
apistubgen command on the package to generate the token JSON file. This file will not be added to the package artifacts.
- Pass the token file to Export-APIViewMarkdown.ps1 on the JSON token file to generate the api markdown file.
Add a step to the Python TypeSpec emitter to automatically generate an api.md file as part of the emitter pipeline.
Prerequirements:
Export-APIViewMarkdown.ps1 should be available underaddressed here: Copyeng/emitters/scriptsoreng/common/scripts. (cc/ @timotheeguerin)Export-APIViewMarkdown.ps1intoeng/emitters/scripts/#10096Scope
Proposed implementation
Extend the Python emitter pipeline from:
to:
apistubgencommand on the package to generate the token JSON file. This file will not be added to the package artifacts.