Repository navigation
[api-v3] INTER-2472: Update schema URL and harden sync script - #208
Conversation
Update the OpenAPI schema URL. `curl` ran without `-f`, so an HTTP error was written to the output file and the script still exited 0. This change fix it. Use an `env bash` shebang and `set -euo pipefail`. Resolve paths relative to the repository root, so the script no longer writes into whatever directory it is invoked from. Collect the curl flags into `CURL_OPTS`, gated on `TRACE` and `ACTIONS_STEP_DEBUG` so runs can be made verbose, and harden them: fail on HTTP errors, retry transient failures, refuse redirects that leave https, and bound connect and transfer time so a stalled download cannot hang CI or a local run. Log the download. Mark `sync.sh` and `generate.sh` executable. `contributing.md` documents running both as `./<script>.sh`, which failed with a permission error. Related-Task: INTER-2472
|
pnpm exec changesetto create a changeset. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A failed transfer can overwrite the existing schema with partial content.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Updates schema synchronization for the planned OpenAPI repository rename and improves download reliability.
Changes:
- Points synchronization at the renamed GitHub Pages URL.
- Adds stricter curl failure, retry, timeout, and tracing behavior.
- Makes the synchronization and generation scripts executable.
| File | Description |
|---|---|
sync.sh |
Hardens schema downloading and resolves repository-relative paths. |
generate.sh |
Makes the existing generation workflow directly executable. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

GitHub redirects repository URLs after a rename but explicitly not project GitHub Pages URLs, so
sync.shwill start failing after the rename. This PR changes the default OpenAPI schema URL.curlran without-f, which made that failure silent. With-fthe same request exits 56 and leaves the existing file untouched.Alongside the URL change, use
env bashshebang andset -euo pipefail. Resolve paths relative to the repository root, so the script no longer writes into whatever directory it is invoked from. Collect thecurlflags intoCURL_OPTS, gated onTRACEandACTIONS_STEP_DEBUGso runs can be made verbose, and harden them to fail on HTTP errors, retry transient failures, refuse redirects that leave https and bound connect and transfer time so a stalled download cannot hang CI or local. Log the download.sync.shandgenerate.shwere both mode644whilecontributing.mddocuments running them as./sync.shand./generate.sh, so both failed with a permission error. Pre-existing and unrelated to the rename.