Skip to content

Commit 58968d1

Browse files
committed
fix: Use mount_path to narrow down urls_for
1 parent 262cdb9 commit 58968d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grape-swagger/rake/oapi_tasks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def make_request(url)
9595
def urls_for(api_class)
9696
api_class.routes
9797
.map(&:path)
98-
.select { |e| e.include?('doc') }
98+
.grep(/#{GrapeSwagger::DocMethods.class_variable_get(:@@mount_path)}\(\.json\)$/)
9999
.reject { |e| e.include?(':name') }
100100
.map { |e| format_path(e) }
101101
.map { |e| [e, ENV.fetch('resource', nil)].join('/').chomp('/') }

0 commit comments

Comments
 (0)