diff --git a/CHANGELOG.md b/CHANGELOG.md index f1b79042e..3f1ef7297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * [#850](https://github.com/ruby-grape/grape-swagger/pull/850): Fix value of `enum` to be `Array` - [@takahashim](https://github.com/takahashim) * [#846] (https://github.com/ruby-grape/grape-swagger/pull/846): Fixes oapi rake tasks, allows generating sepcs for different API versions. +* [#852](https://github.com/ruby-grape/grape-swagger/pull/852): Fix example to work without error - [@takahashim](https://github.com/takahashim) +* Your contribution here. ### 1.4.2 (October 22, 2021) diff --git a/Gemfile b/Gemfile index f38524a55..e3f835c87 100644 --- a/Gemfile +++ b/Gemfile @@ -35,7 +35,9 @@ group :test do gem 'ruby-grape-danger', '~> 0.2.0', require: false gem 'simplecov', require: false +end +group :test, :development do unless ENV['MODEL_PARSER'] == 'grape-swagger-entity' gem 'grape-swagger-entity', git: 'https://github.com/ruby-grape/grape-swagger-entity' end diff --git a/example/config.ru b/example/config.ru index 2c5c23f25..01b667d7c 100644 --- a/example/config.ru +++ b/example/config.ru @@ -1,4 +1,5 @@ -require 'rack/cors' +Bundler.require ENV['RACK_ENV'] + use Rack::Cors do allow do origins '*' @@ -12,7 +13,6 @@ require './api/endpoints' require './api/entities' class Base < Grape::API - require 'grape-entity' require '../lib/grape-swagger' format :json