Skip to content

Point the v2 client at https://api.fastfuels.silvxlabs.com - #249

Merged
amarcozzi merged 3 commits into
mainfrom
185-api-host
Nov 3, 2026
Merged

amarcozzi merged 3 commits into
mainfrom
185-api-host

Conversation

@amarcozzi

@amarcozzi amarcozzi commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #185

What changes

  • DEFAULT_BASE_URL is now https://api.fastfuels.silvxlabs.com: the host only. The v2 API serves every route under /v2 (Serve the v2 API under the /v2 path prefix FastFuels-API-v2#669), so the paths in the OpenAPI spec, and in the regenerated client, carry /v2 (/v2/domains, ...). This matches the v1 client: host https://api.fastfuels.silvxlabs.com, paths under /v1.
  • The client is regenerated from the #669 spec. The diff is the /v2 path prefix on every endpoint (the index endpoint moves from / to /v2) and updated links.create.href descriptions.
  • generate_client.sh fetches $URL/v2/openapi.json. It can also read a local spec through OPENAPI_SPEC, which is how this regen was done before #669 deploys.

#185's title says .../v2 as the base URL. The API team chose host + /v2 paths instead, so a plain regen never doubles the prefix.

Compatibility

  • Requests go through the load balancer and Cloud Armor instead of the run.app URL.
  • Older SDK releases keep working during the API's migration window: #669 keeps the old root paths on run.app for now.
  • FASTFUELS_API_V2_URL still overrides the base URL. Set it to a host (e.g. a local http://127.0.0.1:8080), not to a URL ending in /v2, or the prefix is doubled.

Merge order

  1. Merge and deploy Serve the v2 API under the /v2 path prefix FastFuels-API-v2#669. Until then https://api.fastfuels.silvxlabs.com/v2/... returns 404, so this PR's live CI fails.
  2. Re-run CI here. Optionally regenerate from the deployed spec (bash fastfuels_sdk/v2/generate_client.sh); it should give no diff.
  3. Merge and release.

Verification

Against the #669 branch on a local server (FASTFUELS_API_V2_URL=http://127.0.0.1:8080): tests/v2/test_api.py, test_domains.py and test_exceptions.py pass (35 tests). The server log shows all 46 requests on /v2/....

The v2 API now serves every route under /v2 behind the load balancer
(silvxlabs/FastFuels-API-v2#669). Regenerate the client from /v2/openapi.json,
so the generated paths carry /v2, and use the host as DEFAULT_BASE_URL, the
same shape as the v1 client.

generate_client.sh reads the spec from $URL/v2/openapi.json, or from a local
file given as OPENAPI_SPEC. The regen also drops the removed `/` index
endpoint and picks up the new links.create.href description.
@amarcozzi
amarcozzi marked this pull request as ready for review November 3, 2026 15:01
@amarcozzi
amarcozzi merged commit 35e8500 into main Nov 3, 2026
5 of 7 checks passed
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.

Point the v2 client at https://api.fastfuels.silvxlabs.com/v2

1 participant