Skip to content

Version 0.11.1: the spec at API 1.21.2 - #20

Merged
bensynapse merged 3 commits into
mainfrom
api-1.21.2
Nov 17, 2026
Merged

bensynapse merged 3 commits into
mainfrom
api-1.21.2

Conversation

@bensynapse

@bensynapse bensynapse commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

The client follows API 1.21.2, released on 2026-11-16 (build c2058a39). The saved spec was merged from the public document of faxforagents/openapi#18, which is not merged yet.

What a caller can notice

  • New fields Subscription.cancel_at and Subscription.ends_at. cancel_at is when Stripe is set to end the subscription, which a cancel in the billing portal sets. ends_at is when the plan ends without another charge, None while it renews.
  • OneTimeConfirmSummary.state accepts link_canceled, the confirm link of an order that was canceled. On it, read_by_token and get_by_token of 0.11.0 raise pydantic's ValidationError.
  • ConflictError.reason reads details["reason"], as ConflictError.state reads details["state"]. A second billing.create_subscription_checkout raises ConflictError with plan_active or checkout_open. With checkout_open, details["url"] is the open payment page and details["expires_at"] is when it closes.
  • Docstrings: billing.create_subscription_checkout names its 409, and billing.list_subscriptions names cancel_at and ends_at, on both clients.
  • one_time_sends.confirm names the 409 link_canceled, the answer for the link of a canceled order since API 1.21.2. The public document names it since the second commit of Take the document at API version 1.21.2 openapi#18, which this pull request follows in its own second commit.

New fields, a new accepted value and a new property, so the version is 0.11.1. No method or argument changed, and nothing public is removed.

How the spec was refreshed

The public document at 1.21.0 was the base of a three-way merge with the saved spec, done on the parsed documents. Its 5 changes applied with no conflict, and every earlier local edit is kept. The merge script reproduces the merge of 0.11.0 byte for byte from its inputs, and reports the 16 changes that pull request named. The result was written in the style of scripts/curate.py.

One local edit is new. The public document requires Subscription.cancel_at and Subscription.ends_at, and the saved spec leaves both out of required, as the README asks for new response fields. Apart from that and the header line, the diff of the saved spec equals the diff of the public document. The saved spec has 165 operations and 175 schemas, the same sets as the public document. python scripts/gen_models.py wrote the models: no model is new, 175 in all.

The shared fixtures hold no subscription and no confirm summary in the new state, so they are unchanged. The new tests build the subscription from sub_json of billing/subscriptions.py at c2058a39, and the 409 from refuse_second_checkout in the same file.

Checked

  • pytest -q -m "not live": 199 pass, 4 of them new. The live test was not run, since it needs a test key.
  • The 4 new tests fail against the client and models of 0.11.0.
  • ruff check src tests, ruff format --check src tests, mypy src, python scripts/gen_models.py --check and sh scripts/truthcheck.sh pass.
  • python -m build and twine check --strict pass. The wheel with [cli] installs in a clean venv. faxforagents version prints 0.11.1, and faxforagents.models has 175 names.
  • Every added README and CHANGELOG line, and every new or changed docstring, passes the human-writing lint (docs channel). The lint refused a phrase in the first line of the confirm docstring. It now reads "It takes no API key." The generated OneTimeOrder docstring now passes too, since the public document split its long sentence.

No workflow file changed. Nothing is merged, tagged, released or published by this pull request.

The saved spec follows the public document at API 1.21.2, merged three ways from 1.21.0.
All 5 changes applied with no conflict, and every earlier local edit is kept.
Subscription.cancel_at and Subscription.ends_at stay out of required, as the README asks for new response fields.
The models are regenerated, 175 as before. OneTimeConfirmSummary.state gains link_canceled.
ConflictError.reason reads details.reason, which a second checkout of the plan sends.
The docstrings of both clients name the 409 of the checkout and the end of a subscription.
Four new tests cover the new surface. The README and the CHANGELOG say what changed.
The saved spec takes the public document of faxforagents/openapi#18 at its second commit.
Its 409 of confirm_one_time_order names link_canceled, which the server answers since 1.21.2.
The models are the same. The confirm docstring of both clients names the code.
Its first line is reworded for the writing lint. The link_canceled test also covers a confirm of that link.
The changelog said only that it is null while the plan renews. The server also sends null after the plan ended.
@bensynapse
bensynapse merged commit 0e97640 into main Nov 17, 2026
12 checks passed
@bensynapse
bensynapse deleted the api-1.21.2 branch November 17, 2026 00:04
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