Skip to content

[python] feature request - add api.md to generation #10089

@swathipil

Description

@swathipil

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 
  1. Run the apistubgen command on the package to generate the token JSON file. This file will not be added to the package artifacts.
  2. Pass the token file to Export-APIViewMarkdown.ps1 on the JSON token file to generate the api markdown file.

Metadata

Metadata

Assignees

Labels

emitter:client:pythonIssue for the Python client emitter: @typespec/http-client-python

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions