From 8b1191c67527b705cd805190ab1d41beb653ed41 Mon Sep 17 00:00:00 2001 From: Alexey Matskevich <45947106+AlexeyMatskevich@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:13:49 +0500 Subject: [PATCH] Fixes generation issues in Roda --- lib/rspec/openapi/extractors/rails.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec/openapi/extractors/rails.rb b/lib/rspec/openapi/extractors/rails.rb index b5d1309..62c5922 100644 --- a/lib/rspec/openapi/extractors/rails.rb +++ b/lib/rspec/openapi/extractors/rails.rb @@ -12,10 +12,10 @@ def request_attributes(request, example) route, path = find_rails_route(fixed_request) - raise "No route matched for #{fixed_request.request_method} #{fixed_request.path_info}" if route.nil? - return RSpec::OpenAPI::Extractors::Rack.request_attributes(request, example) unless path + raise "No route matched for #{fixed_request.request_method} #{fixed_request.path_info}" if route.nil? + metadata = example.metadata[:openapi] || {} summary = metadata[:summary] || RSpec::OpenAPI.summary_builder.call(example) tags = metadata[:tags] || RSpec::OpenAPI.tags_builder.call(example)