Class: Apipie::Generator::Swagger::Config

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/apipie/generator/swagger/config.rb

Constant Summary collapse

CONFIG_ATTRIBUTES =
[:include_warning_tags, :content_type_input,
:json_input_uses_refs, :suppress_warnings, :api_host,
:generate_x_computed_id_field, :allow_additional_properties_in_response,
:responses_use_refs, :schemes, :security_definitions,
:global_security].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/apipie/generator/swagger/config.rb', line 52

def initialize
  @content_type_input = :form_data # this can be :json or :form_data
  @json_input_uses_refs = false
  @include_warning_tags = false
  @suppress_warnings = false # [105,100,102]
  @api_host = 'localhost:3000'
  @generate_x_computed_id_field = false
  @allow_additional_properties_in_response = false
  @responses_use_refs = true
  @schemes = [:https]
  @security_definitions = {}
  @global_security = []
end

Class Method Details

.deprecated_methodsObject



66
67
68
69
70
71
72
73
74
# File 'lib/apipie/generator/swagger/config.rb', line 66

def self.deprecated_methods
  CONFIG_ATTRIBUTES.map do |attribute|
    [
      :"swagger_#{attribute}=",
      :"swagger_#{attribute}?",
      :"swagger_#{attribute}"
    ]
  end.flatten
end