Skip to content

fix(generate): authenticated spec fetch (openapi is private) - #49

Merged
zeekay merged 1 commit into
mainfrom
fix/private-spec-fetch
Jul 18, 2026
Merged

fix(generate): authenticated spec fetch (openapi is private)#49
zeekay merged 1 commit into
mainfrom
fix/private-spec-fetch

Conversation

@zeekay

@zeekay zeekay commented Jul 18, 2026

Copy link
Copy Markdown
Member

The spec-update regeneration failed at the fetch step: scripts/generate.sh pulled the spec from raw.githubusercontent.com/hanzoai/openapi/main/hanzo.yaml, which 404s because hanzoai/openapi is a private repo.

Fix: fetch hanzo.yaml through the GitHub Contents API with a SPEC_TOKEN (repo/contents:read on hanzoai/openapi), passed to the Regenerate step via the repo secret SPEC_TOKEN (already set). The local SPEC=/path override is unchanged.

Proven end-to-end: with this script, openapi-generator 7.14.0 regenerates the SDK from the current hanzo.yaml including the new usage-cap/promo types (SpendAlert, CapVerdict, Promo). Paired with hanzoai/openapi@main which fixed the dart/ts generator crashes + the dispatch token.

Rotate SPEC_TOKEN to a KMS-synced long-lived PAT.

raw.githubusercontent.com/hanzoai/openapi/main/hanzo.yaml 404s (openapi is a
private repo), so every spec-update regen failed at the fetch. Fetch hanzo.yaml
through the GitHub Contents API with a SPEC_TOKEN (repo/contents:read on
hanzoai/openapi) instead. Local SPEC=... override unchanged.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@zeekay
zeekay merged commit 4e58233 into main Jul 18, 2026
8 of 10 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.

1 participant