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 1/2] 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 b5d1309f..62c59222 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) From de23b559fb1e2f31dd2e91ef9cf661ad09849c79 Mon Sep 17 00:00:00 2001 From: exoego Date: Thu, 6 Feb 2025 15:23:11 +0900 Subject: [PATCH 2/2] Fix semantic conflict --- spec/apps/roda/doc/openapi.json | 2 +- spec/apps/roda/doc/openapi.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/apps/roda/doc/openapi.json b/spec/apps/roda/doc/openapi.json index a3d18f71..5f6857ee 100644 --- a/spec/apps/roda/doc/openapi.json +++ b/spec/apps/roda/doc/openapi.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "title": "Override title", + "title": "OpenAPI Documentation", "version": "7.7.7" }, "servers": [ diff --git a/spec/apps/roda/doc/openapi.yaml b/spec/apps/roda/doc/openapi.yaml index 7a564592..33863059 100644 --- a/spec/apps/roda/doc/openapi.yaml +++ b/spec/apps/roda/doc/openapi.yaml @@ -1,7 +1,7 @@ --- openapi: 3.0.3 info: - title: Override title + title: OpenAPI Documentation version: 7.7.7 servers: [] paths: