Closed jrmhaig closed 7 months ago
1 Warning | |
---|---|
:warning: | There're library changes, but not tests. That's OK as long as you're refactoring existing code. |
Generated by :no_entry_sign: Danger
Thanks. This works, want to add a line to CHANGELOG? I'll merge and cut a release, been a while.
Merged, thanks. ~If you have more cycles, https://github.com/ruby-grape/grape-swagger-rails/issues/115 is one that could use some attention :)~
I fixed up the test matrix and release 0.5.0 with this change.
Following an upgrade of the
json
gem we are seeing the following error:It turns out that
grape-swagger-rails
depends onostruct
being required elsewhere in the app. This was being done for us byjson
and with version 2.7.2 ostruct has become optional. See https://github.com/flori/json/pull/565One solution is to add
require 'ostruct'
immediately prior to where it is used. This is done in this PR.Another solution would be to not use OpenStruct as it is now discouraged - see https://docs.ruby-lang.org/en/3.0/OpenStruct.html#class-OpenStruct-label-Caveats