mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 15:34:15 +08:00
Show the actual value at the failing JSON pointer path instead of
dumping the entire response body. Also shows the parent object
for additional context.
Before (entire response dumped regardless of where the error is):
RESPONSE: {"user"=>{"id"=>1, "username"=>"admin", ...hundreds of
keys...}}
POSSIBLE ISSUE W/: /user/admin_incoming_sign_in_count
After (pinpoints the failing value and its parent):
VALUE AT "/user/admin_incoming_sign_in_count": nil
PARENT AT "/user": {"id"=>1, "username"=>"admin", ...}
Falls back to printing the full response only when no pointer is
available. Adds a `value_at_json_pointer` helper implementing
RFC 6901 path resolution.
|
||
|---|---|---|
| .. | ||
| shared_examples.rb | ||