ruby-grape / ruby-grape/grape

API breakable change after upgrade to rails 6.1.0

Open
#2,168 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

a change happen in class type in rails 6.1

User.first.errors.messages was returned a Hash instance but now it is giving back a ActiveModel::DeprecationHandlingMessageHash and according to the check here
grape formatted is adding an unwanted key to the returned body which may break API consumer applications

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read lib/grape/error_formatter/json.rb at the linked check around line 25, then reproduce the difference in User.first.errors.messages under Rails 6.1. Confirm the expected API response shape and add regression coverage showing that formatting does not add an unwanted key.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.