class Rswag3::Ui::Configuration
Attributes
assets_root[R]
config_object[RW]
oauth_config_object[RW]
template_locations[R]
Public Class Methods
new()
click to toggle source
# File lib/rswag3/ui/configuration.rb, line 11 def initialize @template_locations = [ # preffered override location "#{Rack::Directory.new('').root}/swagger/index.erb", # backwards compatible override location "#{Rack::Directory.new('').root}/app/views/rswag3/ui/home/index.html.erb", # default location File.expand_path('../index.erb', __FILE__) ] @assets_root = File.expand_path('../../../../node_modules/swagger-ui-dist', __FILE__) @config_object = {} @oauth_config_object = {} end
Public Instance Methods
get_binding()
click to toggle source
# File lib/rswag3/ui/configuration.rb, line 30 def get_binding binding end
swagger_endpoint(url, name)
click to toggle source
# File lib/rswag3/ui/configuration.rb, line 25 def swagger_endpoint(url, name) @config_object[:urls] ||= [] @config_object[:urls] << { url: url, name: name } end