module SwaggeruiLocal

Constants

VERSION

Public Class Methods

render_html(path_to_json = '') click to toggle source
# File lib/swaggerui_local.rb, line 5
def render_html(path_to_json = '')
  template_path = File.join(
    File.dirname(__FILE__),
    'swaggerui_local/html.html'
  )
  File
    .open(template_path, 'r')
    .read
    .gsub('<%json_url_here%>', path_to_json)
end