Fixes last little pathing mistakes from rename

All specs are passing in all gems and in test-app

Properly generates open api 3 swagger via rake rswag:specs:swaggerize and via bundle exec rspec in test-app dir
This commit is contained in:
Jay Danielian
2019-08-01 09:10:38 -04:00
parent 475929e9aa
commit 032ad5dc54
8 changed files with 25 additions and 21 deletions

View File

@@ -1,11 +1,13 @@
module OpenApi::Rswag
module Api
class Configuration
attr_accessor :swagger_root, :swagger_filter
module OpenApi
module Rswag
module Api
class Configuration
attr_accessor :swagger_root, :swagger_filter
def resolve_swagger_root(env)
path_params = env['action_dispatch.request.path_parameters'] || {}
path_params[:swagger_root] || swagger_root
def resolve_swagger_root(env)
path_params = env['action_dispatch.request.path_parameters'] || {}
path_params[:swagger_root] || swagger_root
end
end
end
end

View File

@@ -1,12 +1,14 @@
require 'open_api/rswag/api/middleware'
module OpenApi::Rswag
module Api
class Engine < ::Rails::Engine
isolate_namespace Rswag::Api
module OpenApi
module Rswag
module Api
class Engine < ::Rails::Engine
isolate_namespace OpenApi::Rswag::Api
initializer 'rswag-api.initialize' do |app|
middleware.use Rswag::Api::Middleware, Rswag::Api.config
initializer 'rswag-api.initialize' do |app|
middleware.use OpenApi::Rswag::Api::Middleware, OpenApi::Rswag::Api.config
end
end
end
end