Skip to content

fix: base_url defaults to the API and ignores a trailing /v1 - #1

Merged
dragg merged 1 commit into
mainfrom
fix/base-url-version
Nov 19, 2026
Merged

dragg merged 1 commit into
mainfrom
fix/base-url-version

Conversation

@dragg

@dragg dragg commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

https://api.proofage.net/v1 is the address the API reference and the OpenAPI servers entry print. Passed as base_url, it made every call go to /v1/v1/... and fail with 404, because the client appends the version itself. On production, coding agents integrating PHP and Laravel apps gave up on the SDK at that point and wrote their own Guzzle client.

  • A trailing /{version} on base_url is dropped; a path prefix before it (a proxy) is kept.
  • base_url defaults to https://api.proofage.net (also when null), as in the Node.js and Python SDKs. An explicit empty string is still a configuration error.
  • Tests for the default, the empty string, and six base URL shapes; README, AGENTS.md and CHANGELOG (Unreleased) updated.

Locally: 538 tests, PHPStan and Pint pass. No release yet: the tag comes after review.

🤖 Generated with Claude Code

The API reference prints https://api.proofage.net/v1, and an integration
that passed it as base_url called /v1/v1/... and got 404 on every request:
the client appends the version itself. Production showed coding agents
giving up on the SDK at that point and writing their own Guzzle client.
A trailing /{version} is now dropped (a proxy prefix before it is kept),
and base_url defaults to https://api.proofage.net, as in the Node.js and
Python SDKs. An explicitly empty base_url is still an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dragg
dragg merged commit 107781c into main Nov 19, 2026
9 of 10 checks passed
@dragg
dragg deleted the fix/base-url-version branch November 19, 2026 17:14
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