Repository navigation
Add typed JSON output to doc search - #8798
Open
isaacroldan wants to merge 1 commit into
Open
isaacroldan wants to merge 1 commit into
isaacroldan wants to merge 1 commit into
Conversation
isaacroldan
added this pull request to stack #8799
October 6, 2026 13:18
Contributor
Author
|
/snapit |
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006142201Caution After installing, validate the version by running |
This branch has not been deployed
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.
WHY are these changes introduced?
doc searchprints the search response but has no JSON flag or discoverable result contract. This PR is stacked on the doc fetch change.WHAT is this pull request doing?
Add
--jsonand schema discovery for documentation matches. JSON mode returns a namedresultscollection and records unknown pagination metadata. Preserve the raw response in default mode, including successful responses that do not match the JSON schema; JSON mode reports those responses through the standard fatal-error path.The examples show the same response excerpt. Other matches and the remaining chunk content are omitted.
Default output:
[ { "score": 0.8255787, "content": "Manage webhook subscriptions", "url": "https://shopify.dev/docs/apps/build/webhooks/subscribe", "title": "Manage webhook subscriptions", "domain": "webhooks" } ]JSON output:
{ "results": [ { "score": 0.8255787, "content": "Manage webhook subscriptions", "url": "https://shopify.dev/docs/apps/build/webhooks/subscribe", "title": "Manage webhook subscriptions", "domain": "webhooks" } ], "pageInfo": { "hasNextPage": null } }Validation: 73 documentation tests, build, type-check, lint, and Knip pass. Live command checks and adversarial review cover result projection, raw-response bytes, schema discovery, output channels, and failure exits.
How to manually test your changes?
Compare the raw response with the typed JSON object. The invalid API version should return one error document and a nonzero exit code.
Checklist