Closed anonymelon closed 8 years ago
+1 I am also experiencing this issue. I was able to just delete the base_api_controller/s config line and it started working again.
From docs, you can config like this:
class Swagger::Docs::Config
def self.base_api_controller
ActionController::API
end
end
Swagger::Docs::Config.register_apis({
"1.0" => {
:controller_base_path => "",
:api_file_path => "public"
}
})
And then test by printing to console:
p Swagger::Docs::Config.base_api_controller
Run rake swagger:docs
to see what happen.
In addition, you can see on issue #75
Swagger::Docs::Config.base_api_controller = ActionController::API
Closing - please re-open if still an issue.
I have a requirement to specify a subclass of
ActionController::Base
egMyAPIController
, so I add a configbase_api_controller: MyAPIController
, but it not work. I have read the source code, just replace thebase_api_controller
method's default value toMyAPIController
, it works as expected.I'm wondering how to use this config, can anyone give me a example?
And I find a hidden config
controller_base_path
, I use it to specify the controller path which I want to generate docs, it works, but this solution seems not official :(