module WestfieldSwagger

Constants

DEFAULT_API_VERSION
VERSION

Public Class Methods

api_version() click to toggle source
# File lib/westfield_swagger/engine.rb, line 21
def self.api_version
  if ENV.include? 'SWAGGER_API_VERSION'
    ENV['SWAGGER_API_VERSION'].to_s
  elsif Rails.application.config.respond_to? :api_version
    Rails.application.config.api_version.to_s
  else
    DEFAULT_API_VERSION
  end
end
path_for(version) click to toggle source
# File lib/westfield_swagger/engine.rb, line 31
def self.path_for(version)
  "/swagger/#{version}.json"
end