Class: Fictium::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/fictium/configurations/info.rb,
lib/fictium/configurations/postman.rb,
lib/fictium/configurations/api_blueprint.rb,
lib/fictium/configurations/configuration.rb

Defined Under Namespace

Classes: ApiBlueprint, Info, Postman

Constant Summary collapse

DEFAULT_IGNORED_HEADERS_GROUPS =
%w[rack. action_dispatch. action_controller.].freeze
DEFAULT_IGNORED_HEADERS =
%w[
  accept content-type authorization http_accept content_type
  request_method server_name server_port query_string
  http_cookie path_info x-frame-options x-xss-protection x-content-type-options
  x-download-options x-permitted-cross-domain-policies referrer-policy
  https script_name http_host remote_addr http_user_agent
  http_authorization content_length raw_post_data referrer-policy
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/fictium/configurations/configuration.rb', line 21

def initialize
  @info = Fictium::Configuration::Info.new
  @api_blueprint = Fictium::Configuration::ApiBlueprint.new
  @postman = Fictium::Configuration::Postman.new
  @exporters = [Fictium::OpenApi::V3Exporter.new]

  @summary_format = method(:default_summary_format)
  @pretty_print = true
  setup_descriptors
  setup_strings
  @ignored_header_values = DEFAULT_IGNORED_HEADERS.dup
  @ignored_header_groups = DEFAULT_IGNORED_HEADERS_GROUPS.dup
end

Instance Attribute Details

#api_blueprintObject (readonly)

Returns the value of attribute api_blueprint.



15
16
17
# File 'lib/fictium/configurations/configuration.rb', line 15

def api_blueprint
  @api_blueprint
end

#default_action_descriptorsObject

Returns the value of attribute default_action_descriptors.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def default_action_descriptors
  @default_action_descriptors
end

#default_personObject

Returns the value of attribute default_person.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def default_person
  @default_person
end

#default_response_content_typeObject

Returns the value of attribute default_response_content_type.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def default_response_content_type
  @default_response_content_type
end

#default_subjectObject

Returns the value of attribute default_subject.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def default_subject
  @default_subject
end

#export_pathObject

Returns the value of attribute export_path.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def export_path
  @export_path
end

#exportersObject

Returns the value of attribute exporters.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def exporters
  @exporters
end

#fixture_pathObject

Returns the value of attribute fixture_path.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def fixture_path
  @fixture_path
end

#ignored_header_groupsObject

Returns the value of attribute ignored_header_groups.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def ignored_header_groups
  @ignored_header_groups
end

#ignored_header_valuesObject

Returns the value of attribute ignored_header_values.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def ignored_header_values
  @ignored_header_values
end

#infoObject (readonly)

Returns the value of attribute info.



15
16
17
# File 'lib/fictium/configurations/configuration.rb', line 15

def info
  @info
end

#postmanObject (readonly)

Returns the value of attribute postman.



15
16
17
# File 'lib/fictium/configurations/configuration.rb', line 15

def postman
  @postman
end

#pretty_printObject

Returns the value of attribute pretty_print.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def pretty_print
  @pretty_print
end

#summary_formatObject

Returns the value of attribute summary_format.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def summary_format
  @summary_format
end

#unknown_action_descriptorObject

Returns the value of attribute unknown_action_descriptor.



16
17
18
# File 'lib/fictium/configurations/configuration.rb', line 16

def unknown_action_descriptor
  @unknown_action_descriptor
end