Clean up deprecated code and simplify validations#2573
Merged
dblock merged 1 commit intoruby-grape:masterfrom Jun 23, 2025
Merged
Clean up deprecated code and simplify validations#2573dblock merged 1 commit intoruby-grape:masterfrom
dblock merged 1 commit intoruby-grape:masterfrom
Conversation
ca3280e to
d5adb08
Compare
dblock
approved these changes
Jun 22, 2025
fae8b49 to
ed92eb6
Compare
- Remove deprecated rack_response method from DSL - Remove deprecated exception aliases (MissingGroupTypeError, UnsupportedGroupTypeError) - Remove deprecated Grape::Validations::Base class - Simplify params_scope.rb by removing deprecated excepts parameter - Remove deprecated_class_examples.rb shared spec file - Update specs to remove references to deprecated classes Remove except_values test since already tested in except_values_spec.rb
ed92eb6 to
c8d7d15
Compare
Contributor
Author
|
@dblock added an upgrading note |
dblock
approved these changes
Jun 23, 2025
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.
Clean up deprecated code and simplify validations
This PR removes deprecated code and simplifies the validation system in Grape.
Changes
Removed Deprecated Methods
rack_responsemethod: Removed fromGrape::DSL::InsideRoutemoduleerror!insteadRemoved Deprecated Exception Aliases
Grape::Exceptions::MissingGroupTypeError: Removed deprecated alias forMissingGroupTypeGrape::Exceptions::UnsupportedGroupTypeError: Removed deprecated alias forUnsupportedGroupTypeRemoved Deprecated Base Class
Grape::Validations::Base: Removed deprecated base classGrape::Validations::Validators::BaseinsteadSimplified Validation Logic
params_scope.rb: Simplified validation parameter handlingexceptsparameter from validation methodsexcept_valueshandling logicTest Cleanup
deprecated_class_examples.rb: Removed shared spec file for deprecated classesImpact
Breaking Changes
rack_responsemethod: No longer available, useerror!insteadMissingGroupTypeErrorandUnsupportedGroupTypeErrorremovedGrape::Validations::BaseremovedCode Quality Improvements
Migration Guide
For Users of
rack_responseReplace:
With:
For Users of Deprecated Exception Classes
Replace:
With:
For Custom Validators
Replace:
With:
Testing
Related Issues
This cleanup addresses technical debt and removes deprecated code that was marked for removal in previous versions.