We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5abf605 commit 1bd6a1cCopy full SHA for 1bd6a1c
lib/open_api/generator.rb
@@ -8,7 +8,11 @@ def self.included(base)
8
9
module ClassMethods
10
def generate_docs(api_name = nil)
11
- Dir['./app/controllers/**/*.rb'].each { |file| require file }
+ Dir['./app/controllers/**/*s_controller.rb'].each do |file|
12
+ # Do Not `require`!
13
+ # It causes problems, such as making `skip_before_action` not working.
14
+ file.sub('./app/controllers/', '').sub('.rb', '').camelize.constantize
15
+ end
16
# TODO: _doc should be configured
17
Dir['./app/**/*_doc.rb'].each { |file| require file }
18
if api_name.present?
0 commit comments