What ruby-grape/grape shipped
Written by FoxPlug from the repository's own releases; not affiliated with Ruby-grape. Paste your own repository in the box below and FoxPlug writes the same weekly update for your product. This page is an automatic summary of the releases, pull requests and commits in github.com/ruby-grape/grape; Ruby-grape did not write it and does not use or endorse FoxPlug. Every line links to the change it describes.
Get a weekly update like this for your product, free
Week of September 28, 2026
What shipped
- Error! now raises an exception instead of throwing, so ActiveRecord transactions commit and roll back correctly. Pull request #3023
- Required params with values now reject nil in nested scopes like Hash, Array, and given blocks. Pull request #3010
- Integer params now reject numbers with fractional parts instead of silently truncating them. Pull request #3011
- Header versioning now correctly parses vendor versions containing hyphens. Pull request #3013
- Optional Array params with blocks now validate empty elements sent alongside real ones. Pull request #3014
- Responses now render in the default format when content negotiation picks a format the body cannot render in. Pull request #3015
- Error middleware is no longer copied on successful requests, reducing overhead. Pull request #3016
- Auth middleware is no longer copied per request. Pull request #3018
- Header versioning no longer copies middleware for common Accept headers. Pull request #3017
- Version throughput benchmarks were re-run on Ruby 4.0.7. Pull request #3021
Why it matters
This week addresses correctness issues in parameter validation, content negotiation, and database transaction handling. Performance improvements reduce per-request overhead by eliminating unnecessary middleware copies. These fixes prevent silent data loss and validation bypass in common API patterns.
Changelog entry
- Error! raises an exception instead of throwing, fixing ActiveRecord transaction handling Pull request #3023
- Required params with values now reject nil in Hash, Array, and given block scopes Pull request #3010
- Integer params now reject numbers with fractional parts Pull request #3011
- Header versioning correctly parses vendor versions containing hyphens Pull request #3013
- Optional Array params with blocks validate empty elements sent with real ones Pull request #3014
- Responses render in default format when negotiated format cannot render body Pull request #3015
- Error middleware no longer copied on successful requests Pull request #3016
- Auth middleware no longer copied per request Pull request #3018
- Header versioning no longer copies middleware for common Accept headers Pull request #3017
Grape 2.2 fixes error handling in transactions, validates params correctly in nested scopes, rejects malformed numbers, and eliminates unnecessary per-request middleware copying.
This week's Grape releases address critical correctness issues: error! now properly raises exceptions for database transaction safety, required params reject nil in nested scopes, Integer params reject fractional numbers, and header versioning handles hyphens. We also eliminated per-request middleware copying to reduce overhead on the happy path.
Week of September 21, 2026
What shipped
- Mounted Rack apps now route as ANY methods in the order they were mounted instead of becoming unreachable 405 responses. Pull request #3012
- Request overhead eliminated by stopping the formatter middleware from being copied per request and empty filter phases from running. Pull request #3004
- Rails gemfiles now load Rails before Grape so the railtie initializes properly in CI. Pull request #3005
- Custom coerce messages with { value:, message: } are now honored in param validation. Pull request #2994
- Params and versions with invalid UTF-8 bytes now return gracefully instead of raising ArgumentError. Pull request #3006
- Nested array elements between Hash scopes now name validation errors with correct indices. Pull request #2990
- Header-versioned APIs with capital letters in the vendor now match Accept headers correctly. Pull request #2986
- Requires and optional blocks now enforce declaring exactly one parameter to prevent silent misconfigurations. Pull request #2991
- Blank and present checks reserved for outside input validation to handle loose type requirements. Pull request #3007
- AttributeIterator subclasses folded into a single class reducing duplication. Pull request #3009
Why it matters
This week focused on correctness and performance: mounted Rack apps work as ANY routes, request overhead dropped by eliminating unnecessary middleware copying, and validation now handles edge cases like invalid UTF-8 bytes and nested array error naming. Several subtle routing and formatting bugs were fixed where capital letters in vendors and custom coerce messages were ignored.
Changelog entry
- Mount Rack apps as ANY routes in mount order instead of unreachable 405 responses Pull request #3012
- Fold AttributeIterator subclasses into single class Pull request #3009
- Add grape-on-rack memory profiling harness Pull request #3008
- Improve request performance by eliminating formatter copying and empty filter phases Pull request #3004
- Reserve blank? and present? for outside input validation Pull request #3007
- Handle params and versions with invalid UTF-8 bytes gracefully Pull request #3006
- Load Rails before Grape in Rails gemfiles for proper railtie initialization Pull request #3005
- Honor custom message in coerce option with { value:, message: } syntax Pull request #2994
- Require exactly one parameter name for requires or optional blocks Pull request #2991
- Fix nested array element naming in validation errors through Hash scopes Pull request #2990
- Match header-versioned vendors declared with capital letters Pull request #2986
- Improve test coverage for error messages, middleware, router, and DSL readers Pull request #2983
Grape 4.0 improvements shipping this week: mounted Rack apps now route correctly, request overhead cut by removing middleware copying, and validation handles invalid UTF-8 bytes gracefully.
This week in Grape: mounted Rack apps now route as ANY methods in declaration order, request performance improved by eliminating formatter copying and empty filter phases, Rails initialization fixed in CI, header versioning matches capital letters correctly, custom coerce messages are honored, and nested array validation errors now report accurate indices. Several edge cases in validation and routing are now handled properly.
Week of September 14, 2026
What shipped
- Released v4.0.1 with performance improvements and bug fixes. Release
- Registries for formatters, parsers, params builders, validators and versioners are now replaced on registration instead of written into. Pull request #2976
- Every endpoint's Rack stack now runs through a single shared lambda instead of allocating a fresh one per endpoint. Pull request #2974
- Static values collections are now held as-is instead of wrapped in a lambda to avoid unnecessary per-request calls. Pull request #2975
- Removed two unused match caches per route that Mustermann was never asked to use. Pull request #2973
- Request paths no longer resolve params that were not asked for. Pull request #2972
- README examples and claims were corrected to match actual Grape behavior across roughly 40 passages. Pull request #2971
- Ruby requirement raised to 3.3.1 to avoid anonymous parameter forwarding issues in blocks. Pull request #2966
- Responses are now linted once per API under lint! instead of on every request. Pull request #2960
- Lazy configuration value tree collapsed into a single path-based Value for remountable APIs. Pull request #2950
Why it matters
This release focused on performance optimizations reducing unnecessary allocations and lookups on every request, correctness fixes for edge cases in params handling and error responses, and documentation improvements ensuring the README accurately reflects how Grape works.
Changelog entry
- Replace registries on registration instead of writing into them Pull request #2976
- Hold static values collections as-is instead of behind a lambda Pull request #2975
- Run every endpoint's Rack stack through one shared lambda Pull request #2974
- Copy query params only when params builder hands them back Pull request #2977
- Stop allocating two unused match caches per route Pull request #2973
- Stop request path from resolving params it was not asked for Pull request #2972
- Correct README where examples and claims do not match Grape Pull request #2971
- Correct README passages on given and routes admitting dots Pull request #2969
- Label redirect body with API's content type Pull request #2968
- Hand a Proc passed as last middleware argument to the middleware Pull request #2967
- Require Ruby 3.3.1 Pull request #2966
- Correct two README examples whose response did not match request Pull request #2965
- Let go of mount instances that refresh replaces Pull request #2964
- Stop recording a setting read as a setup step Pull request #2963
- Correct README on param versioning and unsupported request bodies Pull request #2961
- Send content type for
api_formatthe API does not declare Pull request #2959 - Reject non-Hash elements in Array params with blocks Pull request #2957
- Reject what variant collection types cannot coerce Pull request #2955
- Keep String error message's status when route names failure entity Pull request #2953
- Answer HEAD request for unmatched path without body Pull request #2958
Grape v4.0.1 ships with significant performance improvements: fewer allocations per request, smarter registry handling, and optimized path matching. Plus comprehensive README corrections ensuring examples match actual behavior.
Grape v4.0.1 is out with meaningful performance work: shared Rack lambda per endpoint, optimized registry writes, removed unused match caches, and faster path-versioned requests. We also corrected roughly 40 README passages to match actual behavior, improving the experience for developers discovering and using the framework.