From af11a32665d59da169905db268be1618bbae26d6 Mon Sep 17 00:00:00 2001 From: Eric Proulx Date: Sun, 20 Oct 2024 15:41:53 +0200 Subject: [PATCH] Add CHANGELOG and UPGRADING.md --- CHANGELOG.md | 1 + UPGRADING.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5d85dfec..7aea93408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ #### Fixes * [#2504](https://github.com/ruby-grape/grape/pull/2504): Fix leaky modules in specs - [@ericproulx](https://github.com/ericproulx). +* [#2506](https://github.com/ruby-grape/grape/pull/2506): Fix fetch_formatter api_format - [@ericproulx](https://github.com/ericproulx). * Your contribution here. ### 2.2.0 (2024-09-14) diff --git a/UPGRADING.md b/UPGRADING.md index ab80fe4cb..f1826c7b9 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,6 +3,12 @@ Upgrading Grape ### Upgrading to >= 2.3.0 +### `content_type` vs `api.format` inside API + +Before 2.3.0, `content_type` would have priority over `env['api.format']` when set in an API. The priority has been flipped and `env['api.format']` will be checked first. +In addition, the function `api_format` has been added. Instead of setting `env['api.format']` directly, you can call `api_format`. +See [#2506] (https://github.com/ruby-grape/grape/pull/2506) for more information. + #### Remove Deprecated Methods and Options - Deprecated `file` method has been removed. Use `send_file` or `stream`.