Repository navigation
fix(shopping): include extra catalog metadata fields in JSON output - #323
Merged
Merged
Conversation
`shopping catalog search`, `get` and `lookup` now include product and variant metadata fields the catalog returns beyond the documented ones, such as `subscription_type` on email products. Previously these fields were missing from `--output json`. Other shopping responses are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpage-godaddy
requested review from
axburgess-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy,
rts1-godaddy and
sswaminathan-godaddy
as code owners
October 13, 2026 21:48
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is narrowly scoped, consistent with the stated behavior, and adequately tested.
0 open findings
What changed in this PR
Preserves undocumented catalog metadata in JSON output for shopping search, get, and lookup commands.
Changes:
- Rewrites six open metadata schemas for Progenitor catch-all generation.
- Regenerates the Shopping OpenAPI specification.
- Adds refresh and serialization round-trip tests.
| File | Description |
|---|---|
rust/tools/generate-api-catalog/src/shopping_spec.rs |
Adds targeted schema normalization and tests. |
rust/shopping-client/src/lib.rs |
Tests unknown metadata preservation. |
rust/shopping-client/openapi/shopping.oas3.json |
Applies the six generated schema rewrites. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rts1-godaddy
approved these changes
Oct 14, 2026
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.
What changes for users
shopping catalog search,getandlookupwith--output jsonnow include product and variant metadata fields the catalog returns beyond the documented ones. For example, email products now showsubscription_type. Previously these fields were dropped, so scripts and AI assistants could not see them.The human-readable views are unchanged. Other shopping responses (checkout, fulfillment) are unchanged and still omit fields their schemas do not name.
How
The Shopping contract declares product and variant
metadataas open objects, but the generated client kept only the documented fields. The type generator only keeps leftover fields for an open object written asadditionalProperties: {}, which means the same thing astrue.generate-api-catalognow rewrites the six catalog metadata schemas that way when it refreshesshopping.oas3.json, so the generated types gain a catch-all map. The refresh fails if one of those schemas disappears from the contract. Request-side schemas are deliberately left alone: a catch-all field would also be required wherever the CLI builds them by hand, and nothing the CLI sends changes.shopping.oas3.jsonwas regenerated with the tool; the diff is exactly those six rewrites.Testing
shopping-client: a response withsubscription_type,number_of_termsandterm_typekeeps them after decode and encode. It fails against the previous spec.cargo check,cargo clippy -D warnings,cargo fmt --check,check-module-size.shandcargo test --workspaceall pass.subscription_typeappears for email products.🤖 Generated with Claude Code