From ee9a4047cd1a701ea1a35fa2381fdcf755c2ac84 Mon Sep 17 00:00:00 2001
From: Eric <eproulx@petalmd.com>
Date: Mon, 20 May 2024 20:47:27 +0200
Subject: [PATCH 1/3] Remove builder as a dependency Add UPGRADING.md entry

---
 Gemfile       | 1 +
 UPGRADING.md  | 4 ++++
 grape.gemspec | 1 -
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Gemfile b/Gemfile
index cf63280c51..120567b698 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,6 +7,7 @@ source('https://rubygems.org')
 gemspec
 
 group :development, :test do
+  gem 'builder', require: false
   gem 'bundler'
   gem 'rake'
   gem 'rubocop', '1.63.2', require: false
diff --git a/UPGRADING.md b/UPGRADING.md
index 776d50eb21..34a37dca62 100644
--- a/UPGRADING.md
+++ b/UPGRADING.md
@@ -3,6 +3,10 @@ Upgrading Grape
 
 ### Upgrading to >= 2.1.0
 
+#### Builder => XML
+
+From now on, if you want to generate XML, you'll need to add `builder` in your Gemfile.
+
 #### Deep Merging of Parameter Attributes
 
 Grape now uses `deep_merge` to combine parameter attributes within the `with` method. Previously, attributes defined at the parameter level would override those defined at the group level.
diff --git a/grape.gemspec b/grape.gemspec
index 92c2d7fd0c..e3383f9277 100644
--- a/grape.gemspec
+++ b/grape.gemspec
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
   }
 
   s.add_runtime_dependency 'activesupport', '>= 6'
-  s.add_runtime_dependency 'builder'
   s.add_runtime_dependency 'dry-types', '>= 1.1'
   s.add_runtime_dependency 'mustermann-grape', '~> 1.1.0'
   s.add_runtime_dependency 'rack', '>= 2'

From 252a3b9a12bd5b5c8455cf3dcadb546f8756a209 Mon Sep 17 00:00:00 2001
From: Eric <eproulx@petalmd.com>
Date: Mon, 20 May 2024 20:49:25 +0200
Subject: [PATCH 2/3] Add CHANGELOG.md

---
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60f7a77ea9..0cf4396607 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@
 * [#2434](https://github.com/ruby-grape/grape/pull/2434): Implement nested `with` support in parameter dsl - [@numbata](https://github.com/numbata).
 * [#2438](https://github.com/ruby-grape/grape/pull/2438): Fix some Rack::Lint - [@ericproulx](https://github.com/ericproulx).
 * [#2437](https://github.com/ruby-grape/grape/pull/2437): Add length validator - [@dhruvCW](https://github.com/dhruvCW).
+* [#2445](https://github.com/ruby-grape/grape/pull/2445): Remove builder as a dependency - [@ericproulx](https://github.com/ericproulx).
 * Your contribution here.
 
 #### Fixes

From 13dd99c52e69c00a2ccf491635d962c1f6726576 Mon Sep 17 00:00:00 2001
From: Eric <eproulx@petalmd.com>
Date: Tue, 21 May 2024 19:35:49 +0200
Subject: [PATCH 3/3] Update UPGRADING.md

---
 UPGRADING.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/UPGRADING.md b/UPGRADING.md
index 34a37dca62..be2fb564de 100644
--- a/UPGRADING.md
+++ b/UPGRADING.md
@@ -3,9 +3,11 @@ Upgrading Grape
 
 ### Upgrading to >= 2.1.0
 
-#### Builder => XML
+#### Optional Builder
 
-From now on, if you want to generate XML, you'll need to add `builder` in your Gemfile.
+The `builder` gem dependency has been made optional as it's only used when generating XML. If your code does, add `builder` to your `Gemfile`.
+
+See [#2445](https://github.com/ruby-grape/grape/pull/2445) for more information.
 
 #### Deep Merging of Parameter Attributes