API breakable change after upgrade to rails 6.1.0
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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