Clean up deprecated code and simplify validations #2573
Merged
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_response
method: Removed fromGrape::DSL::InsideRoute
moduleerror!
insteadRemoved Deprecated Exception Aliases
Grape::Exceptions::MissingGroupTypeError
: Removed deprecated alias forMissingGroupType
Grape::Exceptions::UnsupportedGroupTypeError
: Removed deprecated alias forUnsupportedGroupType
Removed Deprecated Base Class
Grape::Validations::Base
: Removed deprecated base classGrape::Validations::Validators::Base
insteadSimplified Validation Logic
params_scope.rb
: Simplified validation parameter handlingexcepts
parameter from validation methodsexcept_values
handling logicTest Cleanup
deprecated_class_examples.rb
: Removed shared spec file for deprecated classesImpact
Breaking Changes
rack_response
method: No longer available, useerror!
insteadMissingGroupTypeError
andUnsupportedGroupTypeError
removedGrape::Validations::Base
removedCode Quality Improvements
Migration Guide
For Users of
rack_response
Replace:
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.