Skip to content

feat: switch client generation to openapi-python-client#20

Merged
mekilis merged 1 commit into
mainfrom
oksmart/openapi-python-client-generation
Jul 19, 2026
Merged

feat: switch client generation to openapi-python-client#20
mekilis merged 1 commit into
mainfrom
oksmart/openapi-python-client-generation

Conversation

@mekilis

@mekilis mekilis commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Speakeasy's free tier allows one generated SDK per workspace and convoy.js holds that slot, so Python client generation moves to the OSS openapi-python-client (pinned 0.29.0).

  • sdk_generation.yaml rewritten for openapi-python-client. Same filename and dispatch inputs (force, feature_branch), so the frain-dev/convoy dispatcher works unchanged. Opens a PR only when the regenerated client differs.
  • Speakeasy pipeline kept dormant, not deleted: old workflow renamed to speakeasy_generation.yaml (manual-only), .speakeasy/ and .genignore kept current so switching providers back is a trigger change, not a rebuild.
  • scripts/generate.sh fetches the spec, generates with --fail-on-warning, and rsyncs into src/convoy/ excluding hand-written verify (src/convoy/utils/) and py.typed — same protection contract .genignore gave Speakeasy.
  • Hand-owned pyproject.toml (convoy-python 1.0.0a1, deps httpx + attrs).
  • MIGRATION.md / README updated.

Test plan

  • scripts/generate.sh run locally against the live spec: all 67 operations generated, src/convoy/utils/ untouched
  • Wheel build carries verify + generated client + py.typed (548 files)
  • Pre-generation tree (this PR's state) installs with pip install -e .; from convoy.utils.webhook import Webhook resolves from the installed distribution
  • pytest test/test_webhook.py test/test_shared_vectors.py: 29 passed (pre- and post-generation)

Note

Medium Risk
Touches release/CI generation and uses rsync --delete on src/convoy/; mis-excludes could affect hand-written webhook verify, though excludes and docs explicitly protect utils/.

Overview
Python HTTP client generation moves from Speakeasy to pinned openapi-python-client, while keeping the same sdk_generation.yaml entrypoint and dispatch inputs so upstream dispatchers stay compatible.

The active sdk_generation workflow now installs openapi-python-client/ruff, runs scripts/generate.sh, and only opens or updates a PR when the regenerated tree differs. Speakeasy is not removed: its workflow is renamed to speakeasy_generation.yaml (manual-only), with .genignore and .speakeasy/ kept current for an easy provider switch-back.

Hand-owned packaging and sync rules are added: pyproject.toml (convoy-python 1.0.0a1), .openapi-python-client.yml (package_name_override: convoy), and generate.sh (fetch spec, generate with --fail-on-warning, rsync --delete into src/convoy/ while excluding utils/ and py.typed). .genignore documents the same protected paths for a dormant Speakeasy path.

Test CI always pip install -e . and runs verify tests from the installed distribution—pre-generation PYTHONPATH fallbacks are removed. MIGRATION.md / README describe openapi-python-client as the active generator.

Reviewed by Cursor Bugbot for commit 6da17dd. Bugbot is set up for automated code reviews on this repo. Configure here.

speakeasy's free tier allows one generated SDK per workspace and
convoy.js holds that slot, so python generation moves to the OSS
openapi-python-client (pinned 0.29.0).

- .github/workflows/sdk_generation.yaml: rewritten for
  openapi-python-client; same filename and dispatch inputs so the
  frain-dev/convoy dispatcher works unchanged; opens a PR only when
  the regenerated client differs
- speakeasy pipeline kept dormant, not deleted: old workflow renamed
  to speakeasy_generation.yaml (manual-only), .speakeasy/ and
  .genignore kept current so switching back is a trigger change
- scripts/generate.sh: fetches the spec, generates with
  --fail-on-warning, rsyncs into src/convoy/ excluding hand-written
  verify (src/convoy/utils/) and py.typed
- pyproject.toml: hand-owned packaging (convoy-python 1.0.0a1,
  httpx + attrs); wheel verified to carry verify + generated client
- MIGRATION.md / README.md updated for the generator switch
@mekilis
mekilis merged commit ebffd4f into main Jul 19, 2026
3 checks passed
@mekilis
mekilis deleted the oksmart/openapi-python-client-generation branch July 19, 2026 19:29
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