Module: RSpec::Rails::Swagger::Helpers

Defined in:
lib/rspec/rails/swagger/helpers.rb

Defined Under Namespace

Modules: Operation, Parameters, PathItem, Paths, Response

Class Method Summary collapse

Class Method Details

.add_swagger_type_configurations(config) ⇒ Object

The helpers serve as a DSL.



29
30
31
32
33
34
35
36
37
38
# File 'lib/rspec/rails/swagger/helpers.rb', line 29

def self.add_swagger_type_configurations(config)
  # The filters are used to ensure that the methods are nested correctly
  # and following the Swagger schema.
  config.extend Paths,       type: :request
  config.extend PathItem,    swagger_object: :path_item
  config.extend Parameters,  swagger_object: :path_item
  config.extend Operation,   swagger_object: :operation
  config.extend Parameters,  swagger_object: :operation
  config.extend Response,    swagger_object: :response
end