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

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

Instance Method Summary collapse

Instance Method Details

#capture_exampleObject



263
264
265
# File 'lib/rspec/rails/swagger/helpers.rb', line 263

def capture_example
  [:capture_examples] = true
end

#schema(definition) ⇒ Object



267
268
269
270
271
272
273
274
# File 'lib/rspec/rails/swagger/helpers.rb', line 267

def schema definition
  definition.symbolize_keys!

  ref = definition.delete(:ref)
  schema = ref ? { '$ref' => ref } : definition

  [:swagger_response][:schema] = schema
end