Skip to content

Commit

Permalink
Fixes generation issues in Roda (#239)
Browse files Browse the repository at this point in the history
* Fixes generation issues in Roda

* Fix semantic conflict

---------

Co-authored-by: exoego <[email protected]>
  • Loading branch information
AlexeyMatskevich and exoego authored Feb 6, 2025
1 parent bfa82ae commit f3a44e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rspec/openapi/extractors/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/apps/roda/doc/openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.3",
"info": {
"title": "Override title",
"title": "OpenAPI Documentation",
"version": "7.7.7"
},
"servers": [
Expand Down
2 changes: 1 addition & 1 deletion spec/apps/roda/doc/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
openapi: 3.0.3
info:
title: Override title
title: OpenAPI Documentation
version: 7.7.7
servers: []
paths:
Expand Down

0 comments on commit f3a44e7

Please sign in to comment.