-
Notifications
You must be signed in to change notification settings - Fork 349
Open
Labels
emitter:client:pythonIssue for the Python client emitter: @typespec/http-client-pythonIssue for the Python client emitter: @typespec/http-client-python
Description
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/#10096
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
apistubgencommand 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
emitter:client:pythonIssue for the Python client emitter: @typespec/http-client-pythonIssue for the Python client emitter: @typespec/http-client-python