-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
The Python client's README.md contains relative links to documentation files that don't work when viewed on PyPI.
Example from current README:
| _CardScanApi_ | [**create_card**](docs/CardScanApi.md#create_card) | **POST** /cards | Creates a new card |When viewed on PyPI (https://pypi.org/project/cardscan-client/), these links try to resolve to:
https://pypi.org/project/cardscan-client/docs/CardScanApi.md
This results in 404 errors because PyPI doesn't host the documentation files.
Current Impact
All documentation links in the API methods table and models table are broken on PyPI, making it difficult for users to find detailed documentation.
Proposed Solutions
Option 1: Convert to absolute GitHub URLs
Update the template to generate absolute URLs:
| _CardScanApi_ | [**create_card**](https://github.com/CardScan-ai/api-clients/blob/main/clients/cardscan-python/docs/CardScanApi.md#create_card) | **POST** /cards | Creates a new card |Option 2: Post-process during packaging
Add a script that converts relative links to absolute GitHub URLs when building for PyPI:
# In setup.py or pyproject.toml build process
readme_content = readme_content.replace(
"](docs/",
"](https://github.com/CardScan-ai/api-clients/blob/main/clients/cardscan-python/docs/"
)Option 3: Remove links from PyPI version
Have a separate README for PyPI that removes the links and directs users to GitHub for full documentation.
Recommendation
Option 1 is probably best - update the Mustache template to generate absolute URLs. This ensures links work everywhere (GitHub, PyPI, local) without requiring build-time processing.
This issue likely affects other generated clients as well if they're published to package repositories.