Skip to content

Commit fad6b2e

Browse files
committed
Add README.md and CHANGELOG.md
Fix typo in UPGRADING.md
1 parent 2caf6da commit fad6b2e

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* [#2549](https://github.com/ruby-grape/grape/pull/2549): Delegate cookies management to `Grape::Request` - [@ericproulx](https://github.com/ericproulx).
1212
* [#2554](https://github.com/ruby-grape/grape/pull/2554): Remove `Grape::Http::Headers` and `Grape::Util::Lazy::Object` - [@ericproulx](https://github.com/ericproulx).
1313
* [#2556](https://github.com/ruby-grape/grape/pull/2556): Remove unused `Grape::Request::DEFAULT_PARAMS_BUILDER` constant - [@eriklovmo](https://github.com/eriklovmo).
14+
* [#2557](https://github.com/ruby-grape/grape/pull/2557): Add lint! - [@ericproulx](https://github.com/ericproulx).
1415
* Your contribution here.
1516

1617
#### Fixes

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
- [Header](#header)
2929
- [Accept-Version Header](#accept-version-header)
3030
- [Param](#param)
31+
- [Linting](#linting)
32+
- [Bug with Rack::ETag under Rack 3.X](#bug-in-racketag-under-rack-3x)
3133
- [Describing Methods](#describing-methods)
3234
- [Configuration](#configuration)
3335
- [Parameters](#parameters)
@@ -650,6 +652,25 @@ version 'v1', using: :param, parameter: 'v'
650652
curl http://localhost:9292/statuses/public_timeline?v=v1
651653

652654

655+
## Linting
656+
657+
You can check if your API is in conformance with [Rack's specification](https://github.com/rack/rack/blob/main/SPEC.rdoc) by calling `lint!` at the API level or through [configuration](#configuration):
658+
```ruby
659+
# API Level
660+
class Api < Grape::API
661+
lint!
662+
end
663+
# OR through configuration
664+
Grape.configure do |config|
665+
config.lint = true
666+
end
667+
# OR
668+
Grape.config.lint = true
669+
```
670+
671+
### Bug in Rack::ETag under Rack 3.X
672+
If you're using Rack 3.X and the `Rack::Etag` middleware (used by [Rails](https://guides.rubyonrails.org/rails_on_rack.html#inspecting-middleware-stack)), a [bug](https://github.com/rack/rack/pull/2324) related to linting has been fixed in [3.1.13](https://github.com/rack/rack/blob/v3.1.13/CHANGELOG.md#3113---2025-04-13) and [3.0.15](https://github.com/rack/rack/blob/v3.1.13/CHANGELOG.md#3015---2025-04-13) respectively.
673+
653674
## Describing Methods
654675

655676
You can add a description to API methods and namespaces. The description would be used by [grape-swagger][grape-swagger] to generate swagger compliant documentation.

UPGRADING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ When using together with `Grape::Extensions::Hash::ParamBuilder`, `route_param`
130130
This was a regression introduced by [#2326](https://github.com/ruby-grape/grape/pull/2326) in Grape v1.8.0.
131131

132132
```ruby
133-
grape.configure do |config|
133+
Grape.configure do |config|
134134
config.param_builder = Grape::Extensions::Hash::ParamBuilder
135135
end
136136

0 commit comments

Comments
 (0)