Ship pre-bundled upstream-registry schema variant#92
Closed
Conversation
Adds a `upstream-registry.bundled.schema.json` release asset alongside the raw schema. The bundled version replaces the two remote $refs to the MCP server schema with inline placeholder objects that carry the schema URL in their descriptions. Motivation: JSON-Schema viewer plugins (in particular the one used by stacklok/docs-website) cannot resolve remote $refs at render time, so they currently run a post-download bundling step themselves. Shipping a pre-bundled variant lets them skip that step. The raw schema stays as the canonical source — existing consumers are unaffected. Purely additive: one new release asset, no changes to the existing uploads. Uses jq (already on the runner) — no new dependencies or tooling in this repo. Paired with the docs-website automation rollup in stacklok/docs-website#748. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing per discussion on the downstream PR — the bundling logic is docs-renderer-specific (JSON-Schema viewer can't resolve remote $refs at render time) and is better kept colocated with the renderer in stacklok/docs-website rather than added to a pure-Go library repo. Existing Thanks for your time. |
7 tasks
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.
Summary
Adds
upstream-registry.bundled.schema.jsonas a new release asset alongside the existing rawupstream-registry.schema.json. The bundled variant replaces the two remote$refs that point athttps://static.modelcontextprotocol.io/schemas/.../server.schema.jsonwith inline placeholder objects, so consumers rendering the schema with a JSON-Schema viewer don't have to resolve them at runtime.Raw schema stays as the canonical source — purely additive, no existing consumers affected.
Motivation
stacklok/docs-website renders this schema using the Docusaurus JSON-Schema viewer plugin. That plugin can't resolve remote
$refs at render time, so docs-website runs a post-download bundling step via@apidevtools/json-schema-ref-parser. Shipping a pre-bundled variant lets the consumer just use it directly.Part of the docs-website automation rollup in PR #748, alongside two related PRs on toolhive (#4982 CRD tarball + #4983 re-exported core schemas). Together these let docs-website stop running any transform scripts during release-doc regeneration.
What's in this PR
.github/workflows/release.yml: one new step that runsjqoverupstream-registry.schema.jsonand writes a bundled variant tobuild/upstream-registry.bundled.schema.json. Uses jq (already on the runner) — no new dependencies, no new Node/tooling footprint in this Go library.gh release uploadcall.The jq filter only touches the two specific remote
$refs to the MCP server schema. Other$refs (e.g., the skill schema self-reference) are left intact.Test plan
Local smoke test:
Verified locally that:
.properties.data.properties.servers.itemstransforms to{type: object, description: "..."}.properties.data.properties.groups.items.properties.servers.itemstransforms the same wayNotes
/2026-xx-xx/in the URL), the sanity check fails with a clear "URL may have changed; update the jq filter" message. That's the intended feedback loop.🤖 Generated with Claude Code