Skip to content

Commit 31e2220

Browse files
authored
Merge pull request #2 from bf4/remove_undesired_path
Remove undesired path: api_docs/docs/v1 is now api_docs/v1
2 parents 4299e79 + 2100131 commit 31e2220

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/controllers/api_doc_server/application_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
1111
protected
1212

1313
def authenticate_admin
14-
instance_exec &ApiDocServer.configuration.authentication_proc
14+
instance_exec(&ApiDocServer.configuration.authentication_proc)
1515
end
1616
end
1717
end

config/routes.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
ApiDocServer::Engine.routes.draw do
44
scope format: false do
5-
resources :docs, only: %i(index show) do
5+
resources :docs, path: '/', only: %i(index show) do
66
collection do
77
get 'oauth2', to: 'docs#oauth2', format: false
88
end

test/controllers/api_doc_server/docs_controller_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DocsControllerTest < ActionDispatch::IntegrationTest
1919
end
2020

2121
test 'default config options should work successfully' do
22-
get '/swagger/docs/v1'
22+
get '/swagger/v1'
2323
assert_response :success
2424
assert_match("url='api_docs/v1/swagger.yaml'", @response.body)
2525
end

0 commit comments

Comments
 (0)