Open ayudemura opened 8 years ago
I'm having the same error. The problem is that register_apis
is not using the base_api_controller
param, it's using its own default (ActionController::Base
). If you use this controller as your base, everything works, but using ActionController::API
fails.
As a workaround, adding a line before that call, setting the base controller, solves the problem:
Swagger::Docs::Config.base_api_controller = ActionController::API
.
I have this same problem
I found two ways to solve this:
swagger_docs.rb
include Swagger::Docs::ImpotentMethods
class Swagger::Docs::Config def self.base_api_controller ActionController::API end end
Or adding at the top of `routes.rb`
```rb
Swagger::Docs::Config.base_api_controller = ActionController::API
include Swagger::Docs::ImpotentMethods
Same here! Workarounds are not working with Rails 5 using an ActionController::API.
Having same problem. Controllers without index action are not taken for making swagger file. @fercreek did you tried with rails 5.2 api ? @msdundar have you found the solution?
I am experiencing the identical problem as #104 (which is closed) I am hoping to get some help on config.
My swagger_docs.rb initialization is