fix: misleading JSONPath example and inconsistent message.path descriptions#380
Open
sakinaroufid wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
Open
Conversation
Unify the `path` field description across `message_error.json`, `message_warning.json`, and `message_info.json` so all three share the same wording and example. Also fixes a stale example in `message_error.json` that referenced `$.items[1]` — no `items` field exists on checkout, cart, or order responses; the actual field is `line_items`.
sbeashwar
pushed a commit
to sbeashwar/vaithee-ucp
that referenced
this pull request
Apr 30, 2026
The path field appears in examples throughout the spec but has no prose explaining how to construct it. Add a conventions section under Error Handling covering: - RFC 9535 JSONPath, snake_case property names - Simple field references, indexed array access, filter expressions - Why filter expressions are preferred over index-based paths - Specificity rule (field-level path beats parent-level) - Create vs. Update keying difference (item.id vs line item id) Complements PR Universal-Commerce-Protocol#380 which fixes the schema descriptions on the message_* types.
Contributor
|
Thanks @sakinaroufid for the description fix! Proposed changes LGTM, but can you please update your branch and make sure the workflow is able to correctly execute before I stamp the PR? |
drewolson-google
approved these changes
May 5, 2026
Contributor
Author
|
@jingyli Updated branch + made sure the workflow executes correctly! Thanks for your review! |
sbeashwar
pushed a commit
to sbeashwar/vaithee-ucp
that referenced
this pull request
May 6, 2026
The path field appears in examples throughout the spec but has no prose explaining how to construct it. Add a conventions section under Error Handling covering: - RFC 9535 JSONPath, snake_case property names - Simple field references, indexed array access, filter expressions - Why filter expressions are preferred over index-based paths - Specificity rule (field-level path beats parent-level) - Create vs. Update keying difference (item.id vs line item id) Complements PR Universal-Commerce-Protocol#380 which fixes the schema descriptions on the message_* types.
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
The
pathproperty onmessage_error,message_warning, andmessage_infois an optional RFC 9535 JSONPath pointer used to anchor a message to a specific component of the response payload. Its JSON Schemadescriptionis currently inconsistent across the three sibling schemas, and the example inmessage_error.jsonreferences a field that does not exist in the protocol.Findings
message_info.json— description omits an example, giving schema consumers no pattern to follow.message_warning.json— phrases the field as "JSONPath (RFC 9535) to related field", diverging from the sibling wording.message_error.json— canonical phrasing, but the example points at$.items[1]. No top-levelitemscollection is defined anywhere incheckout.json,cart.json, ororder.json; the actual array isline_items(see also the JSONPath examples used indiscount.jsonandmessage_warning.json). The example is therefore unresolvable against any valid response and is actively misleading.Change
Unify the three
descriptionstrings on a single canonical form —"RFC 9535 JSONPath to the component the message refers to (e.g., \$.line_items[0])."— matching the example pattern already used elsewhere in the schema set.Test plan