fix: misleading JSONPath example and inconsistent message.path descriptions#380
Open
sakinaroufid wants to merge 1 commit 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`.
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