Repository navigation
Fetch the API contract from docs.substratalapps.com - #4
Merged
Merged
Conversation
The API docs moved from compositecode.github.io/substratalapps.com to docs.substratalapps.com, and the old URL now answers 301. curl -fsS doesn't follow redirects, so api-sync.yml saved nginx's redirect page as api/openapi.yaml and Kiota failed on it, every day since. - gen-api.sh fetches https://docs.substratalapps.com/openapi.yaml (OPENAPI_URL overrides it), follows redirects, and refuses a download that isn't an OpenAPI 3 document instead of overwriting the snapshot. - ci.yml's live-contract comparison and api-sync.yml's changelog link use the new host; so do README.md and api/README.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the API contract sync workflow, which has failed on every scheduled run since mid-November.
Cause
The API docs moved from
compositecode.github.io/substratalapps.comtodocs.substratalapps.com, and the oldopenapi.yamlURL now answers301 Moved Permanently.scripts/gen-api.sh --fetchusedcurl -fsS, which doesn't follow redirects. It saved nginx's redirect page asapi/openapi.yaml, and Kiota then failed withOpenAPI specification version '<html> … 301 Moved Permanently …' is not supported.CI itself stayed green. Its live-contract comparison only posts a notice, so it didn't surface the problem.
Fix
gen-api.shfetcheshttps://docs.substratalapps.com/openapi.yaml(overridable withOPENAPI_URL) and follows redirects.ci.yml,api-sync.yml,README.mdandapi/README.mdpoint at the new host.Tested
OPENAPI_URL→ exits 1 with the first bytes shown;api/openapi.yamlunchanged.After merging
The published contract is now
1.0.0-draft.36(157 operations; this repo has draft.9 with 124).Substratal-Versionis still1, so the change is additive. The next sync run will open its own PR with the regenerated client.🤖 Generated with Claude Code