mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 14:27:21 +00:00
16 lines
373 B
Ruby
16 lines
373 B
Ruby
require 'swagger_rails/middleware/swagger_json'
|
|
|
|
module SwaggerRails
|
|
class Engine < ::Rails::Engine
|
|
isolate_namespace SwaggerRails
|
|
|
|
initializer 'swagger_rails.initialize' do |app|
|
|
middleware.use SwaggerJson, SwaggerRails.config
|
|
|
|
if app.config.respond_to?(:assets)
|
|
app.config.assets.precompile += [ 'swagger-ui/*' ]
|
|
end
|
|
end
|
|
end
|
|
end
|