Skip to content

Update generated code for private-preview#1822

Open
stripe-openapi[bot] wants to merge 8 commits intoprivate-previewfrom
latest-codegen-private-preview
Open

Update generated code for private-preview#1822
stripe-openapi[bot] wants to merge 8 commits intoprivate-previewfrom
latest-codegen-private-preview

Conversation

@stripe-openapi
Copy link
Contributor

@stripe-openapi stripe-openapi bot commented Mar 18, 2026

Codegen for openapi v2205 and proto spec .

Changelog

  • Release specs are identical.

@stripe-openapi stripe-openapi bot requested a review from a team as a code owner March 18, 2026 15:36
@stripe-openapi stripe-openapi bot requested review from mbroshi-stripe and removed request for a team and mbroshi-stripe March 18, 2026 15:36
@stripe-openapi stripe-openapi bot enabled auto-merge March 18, 2026 15:36
jeremyevans and others added 2 commits March 19, 2026 10:13
stripe does not have a dependency on cgi. If you have stripe in your
Gemfile, but not cgi, there is a verbose mode warning when requiring
stripe on Ruby 4.0. Example file:

```
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'stripe'
  gem 'logger' # Missing gem dependency on logger, different issue
end

require "stripe"
```

Running in verbose mode:

```
$ ruby -v t.rb
ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [x86_64-linux]
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/gems/4.0.0/gems/stripe-18.4.2/lib/stripe.rb:5: warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
```

The only cases in that are using a CGI method other than CGI.escape is
in a couple tests using CGI.parse, so add cgi to the Gemfile and require
cgi in those two test files. Switch the cgi require in lib to
cgi/escape.  This avoids the warning, and will avoid breakage in
Ruby 4.1.
@stripe-openapi stripe-openapi bot force-pushed the latest-codegen-private-preview branch from 8706e12 to 7c89eea Compare March 19, 2026 17:22
stripe-openapi bot and others added 6 commits March 19, 2026 12:11
* Update generated code for v2202 and

* Update generated code for v2202 and

* Update generated code for v2203 and

* Update generated code for v2204 and

* Update generated code for v2204 and

* Update generated code for v2204 and

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com>
stripe is missing a gem dependency on logger. When including stripe in
a Gemfile, if logger is not specified directly or included transitively
by another gem, this warns in verbose mode on Ruby 3.4, and results in
an error on Ruby 4.0.  Example file:

```
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'stripe'
end

require "stripe"
```

Running on Ruby 4.0.2:

```
$ ruby -v; ruby t.rb
ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [x86_64-linux]
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/gems/4.0.0/gems/stripe-18.4.2/lib/stripe.rb:7: warning: logger used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add logger to your Gemfile or gemspec to fix this error.
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:71:in 'block (2 levels) in Bundler::Runtime#require': There was an error while trying to load the gem 'stripe'. (Bundler::GemRequireError)
Gem Load Error is: cannot load such file -- logger
Backtrace for gem load error is:
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel.require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/gems/4.0.0/gems/stripe-18.4.2/lib/stripe.rb:7:in '<top (required)>'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel#require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel.replace_require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:63:in 'block (2 levels) in Bundler::Runtime#require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'Array#each'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'block in Bundler::Runtime#require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Array#each'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:91:in 'block in Object#gemfile'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/settings.rb:143:in 'Bundler::Settings#temporary'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:60:in 'Object#gemfile'
t.rb:3:in '<main>'
Bundler Error Backtrace:

        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'Array#each'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'block in Bundler::Runtime#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Array#each'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:91:in 'block in Object#gemfile'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/settings.rb:143:in 'Bundler::Settings#temporary'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:60:in 'Object#gemfile'
        from t.rb:3:in '<main>'
/home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- logger (LoadError)
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/gems/4.0.0/gems/stripe-18.4.2/lib/stripe.rb:7:in '<top (required)>'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel.replace_require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:63:in 'block (2 levels) in Bundler::Runtime#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'Array#each'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:58:in 'block in Bundler::Runtime#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Array#each'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:91:in 'block in Object#gemfile'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/settings.rb:143:in 'Bundler::Settings#temporary'
        from /home/jeremy/.local/share/mise/installs/ruby/4.0.2/lib/ruby/4.0.0/bundler/inline.rb:60:in 'Object#gemfile'
        from t.rb:3:in '<main>'
```

This is simple to fix by including logger as a gem dependency.

Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants