Module: Openapi::Rswag::Specs::ExampleHelpers
- Defined in:
- lib/openapi/rswag/specs/example_helpers.rb
Instance Method Summary collapse
Instance Method Details
#assert_response_matches_metadata(metadata) ⇒ Object
31 32 33 |
# File 'lib/openapi/rswag/specs/example_helpers.rb', line 31 def () ResponseValidator.new.validate!(, response) end |
#submit_request(metadata) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openapi/rswag/specs/example_helpers.rb', line 9 def submit_request() request = RequestFactory.new.build_request(, self) if RAILS_VERSION < 5 send( request[:verb], request[:path], request[:payload], request[:headers] ) else send( request[:verb], request[:path], { params: request[:payload], headers: request[:headers] } ) end end |