Skip to content

Commit

Permalink
Comments for readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Nov 7, 2023
1 parent 613e5f0 commit 7a6cefc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* [#2360](https://github.com/ruby-grape/grape/pull/2360): Reduce gem size by removing specs - [@ericproulx](https://github.com/ericproulx).
* [#2361](https://github.com/ruby-grape/grape/pull/2361): Remove `Rack::Auth::Digest` - [@ninoseki](https://github.com/ninoseki).
* Your contribution here.

#### Fixes

* [#2364](https://github.com/ruby-grape/grape/pull/2364): Add missing requires - [@ericproulx](https://github.com/ericproulx).
* [#2366](https://github.com/ruby-grape/grape/pull/2366): Quality arguments to `accept` header should default to 1.0 - [@hiddewie](https://github.com/hiddewie).
* [#2366](https://github.com/ruby-grape/grape/pull/2366): Default quality to 1.0 in the `Accept` header when omitted - [@hiddewie](https://github.com/hiddewie).
* Your contribution here.

### 1.8.0 (2023/08/30)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ When an invalid `Accept` header is supplied, a `406 Not Acceptable` error is ret
option is set to `false`. Otherwise a `404 Not Found` error is returned by Rack if no other route
matches.

Grape will evaluate the relative quality preference included in Accept headers and default to a quality of 1.0 when omitted. In the following example a Grape API that supports XML and JSON in that order will return JSON:

curl -H "Accept: text/xml;q=0.8, application/json;q=0.9" localhost:1234/resource

### Accept-Version Header

```ruby
Expand Down Expand Up @@ -1600,7 +1604,7 @@ Note endless ranges are also supported with ActiveSupport >= 6.0, but they requi
```ruby
params do
requires :minimum, type: Integer, values: 10..
optional :maximum, type: Integer, values: ..10
optional :maximum, type: Integer, values: ..10
end
```

Expand Down

0 comments on commit 7a6cefc

Please sign in to comment.