Exception: Rswag::Specs::MissingParameterError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rswag/specs/request_factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body_param) ⇒ MissingParameterError

Returns a new instance of MissingParameterError.



288
289
290
# File 'lib/rswag/specs/request_factory.rb', line 288

def initialize(body_param)
  @body_param = body_param
end

Instance Attribute Details

#body_paramObject (readonly)

Returns the value of attribute body_param.



286
287
288
# File 'lib/rswag/specs/request_factory.rb', line 286

def body_param
  @body_param
end

Instance Method Details

#messageObject



292
293
294
295
296
297
298
299
300
301
# File 'lib/rswag/specs/request_factory.rb', line 292

def message
  <<-MSG
    Missing parameter '#{body_param}'

    Please check your spec. It looks like you defined a body parameter,
    but did not declare usage via let. Try adding:

        let(:#{body_param}) {}
  MSG
end