Exception: Apipie::ResponseDoesNotMatchSwaggerSchema
- Defined in:
- lib/apipie/errors.rb
Instance Method Summary collapse
-
#initialize(controller_name, method_name, response_code, error_messages, schema, returned_object) ⇒ ResponseDoesNotMatchSwaggerSchema
constructor
A new instance of ResponseDoesNotMatchSwaggerSchema.
- #to_s ⇒ Object
Constructor Details
#initialize(controller_name, method_name, response_code, error_messages, schema, returned_object) ⇒ ResponseDoesNotMatchSwaggerSchema
Returns a new instance of ResponseDoesNotMatchSwaggerSchema.
62 63 64 65 66 67 68 69 |
# File 'lib/apipie/errors.rb', line 62 def initialize(controller_name, method_name, response_code, , schema, returned_object) @controller_name = controller_name @method_name = method_name @response_code = response_code @error_messages = @schema = schema @returned_object = returned_object end |
Instance Method Details
#to_s ⇒ Object
71 72 73 |
# File 'lib/apipie/errors.rb', line 71 def to_s "Response does not match swagger schema (#{@controller_name}##{@method_name} #{@response_code}): #{@error_messages}\nSchema: #{JSON(@schema)}\nReturned object: #{@returned_object}" end |