class Swaggard::Configuration

Configuration for Swagger Yard, use like:

Swaggard.configure do |config|
  config.api_version            = '0.1'
  config.api_base_path          = '/api'
  config.authentication_type    = 'header'
  config.authentication_key     = 'X-AUTHORIZATION'
  config.authentication_value   = 'you-secret-key'
  config.additional_parameters  = [{ key: 'STORE-CODE', type: 'header', value: '1' }]
end

Attributes

access_password[W]
access_username[W]
additional_parameters[W]
api_base_path[W]
api_formats[W]
api_version[W]
authentication_key[W]
authentication_type[W]
authentication_value[W]
contact_email[W]
contact_name[W]
contact_url[W]
controllers_path[RW]
custom_types[R]
default_content_type[W]
default_response_description[W]
default_response_status_code[W]
description[W]
exclude_base_path_from_paths[W]
excluded_paths[W]
host[W]
ignore_put_if_patch_exists[W]
ignore_undocumented_paths[W]
language[W]
license_name[W]
models_paths[RW]
path_parameter_description[W]
routes[RW]
schemes[W]
swagger_version[W]
title[W]
tos[W]
use_cache[W]

Public Instance Methods

access_password() click to toggle source
# File lib/swaggard/configuration.rb, line 100
def access_password
  @access_password ||= ''
end
access_username() click to toggle source
# File lib/swaggard/configuration.rb, line 96
def access_username
  @access_username ||= ''
end
add_custom_type(name, definition) click to toggle source
# File lib/swaggard/configuration.rb, line 148
def add_custom_type(name, definition)
  custom_types[name] = definition
end
additional_parameters() click to toggle source
# File lib/swaggard/configuration.rb, line 132
def additional_parameters
  @additional_parameters ||= []
end
api_base_path() click to toggle source
# File lib/swaggard/configuration.rb, line 36
def api_base_path
  @api_base_path ||= '/'
end
api_formats() click to toggle source
# File lib/swaggard/configuration.rb, line 40
def api_formats
  @api_formats ||= [:xml, :json]
end
api_version() click to toggle source
# File lib/swaggard/configuration.rb, line 32
def api_version
  @api_version ||= '0.1'
end
authentication_key() click to toggle source
# File lib/swaggard/configuration.rb, line 88
def authentication_key
  @authentication_key ||= 'api_key'
end
authentication_type() click to toggle source
# File lib/swaggard/configuration.rb, line 84
def authentication_type
  @authentication_type ||= 'query'
end
authentication_value() click to toggle source
# File lib/swaggard/configuration.rb, line 92
def authentication_value
  @authentication_value ||= ''
end
contact_email() click to toggle source
# File lib/swaggard/configuration.rb, line 68
def contact_email
  @contact_email ||= ''
end
contact_name() click to toggle source
# File lib/swaggard/configuration.rb, line 64
def contact_name
  @contact_name ||= ''
end
contact_url() click to toggle source
# File lib/swaggard/configuration.rb, line 72
def contact_url
  @contact_url ||= ''
end
default_content_type() click to toggle source
# File lib/swaggard/configuration.rb, line 104
def default_content_type
  @default_content_type ||= ''
end
default_response_description() click to toggle source
# File lib/swaggard/configuration.rb, line 112
def default_response_description
  @default_response_description ||= 'successful operation'
end
default_response_status_code() click to toggle source
# File lib/swaggard/configuration.rb, line 108
def default_response_status_code
  @default_response_status_code ||= 'default'
end
description() click to toggle source
# File lib/swaggard/configuration.rb, line 56
def description
  @description ||= ''
end
exclude_base_path_from_paths() click to toggle source
# File lib/swaggard/configuration.rb, line 122
def exclude_base_path_from_paths
  return @exclude_base_path_from_paths unless @exclude_base_path_from_paths.nil?

  @exclude_base_path_from_paths = false
end
excluded_paths() click to toggle source
# File lib/swaggard/configuration.rb, line 144
def excluded_paths
  @excluded_paths ||= []
end
host() click to toggle source
# File lib/swaggard/configuration.rb, line 44
def host
  @host ||= ''
end
ignore_put_if_patch_exists() click to toggle source
# File lib/swaggard/configuration.rb, line 156
def ignore_put_if_patch_exists
  return @ignore_put_if_patch_exists unless @ignore_put_if_patch_exists.nil?

  @ignore_put_if_patch_exists = false
end
ignore_undocumented_paths() click to toggle source
# File lib/swaggard/configuration.rb, line 116
def ignore_undocumented_paths
  return @ignore_undocumented_paths unless @ignore_undocumented_paths.nil?

  @ignore_undocumented_paths = false
end
language() click to toggle source
# File lib/swaggard/configuration.rb, line 128
def language
  @language ||= 'en'
end
license_name() click to toggle source
# File lib/swaggard/configuration.rb, line 76
def license_name
  @license_name ||= ''
end
license_url() click to toggle source
# File lib/swaggard/configuration.rb, line 80
def license_url
  @license_url ||= ''
end
path_parameter_description() click to toggle source
# File lib/swaggard/configuration.rb, line 152
def path_parameter_description
  @path_parameter_description ||= ->(path_parameter) { "Scope response to #{path_parameter.name}" }
end
schemes() click to toggle source
# File lib/swaggard/configuration.rb, line 48
def schemes
  @schemes ||= [:https, :http]
end
swagger_version() click to toggle source
# File lib/swaggard/configuration.rb, line 28
def swagger_version
  @swagger_version ||= '2.0'
end
title() click to toggle source
# File lib/swaggard/configuration.rb, line 52
def title
  @title ||= ''
end
tos() click to toggle source
# File lib/swaggard/configuration.rb, line 60
def tos
  @tos ||= ''
end
use_cache() click to toggle source
# File lib/swaggard/configuration.rb, line 136
def use_cache
  @use_cache ||= false
end