From 378710c1799841f93b1e377ed1bac807b1182bdb Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 3 Dec 2024 10:23:13 -0800 Subject: [PATCH] ResourceBase use OpenAPI::Document#operations for operations --- lib/scorpio/resource_base.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/scorpio/resource_base.rb b/lib/scorpio/resource_base.rb index 2f6384ec..a17d7a7a 100644 --- a/lib/scorpio/resource_base.rb +++ b/lib/scorpio/resource_base.rb @@ -242,9 +242,7 @@ def api_method_name_by_operation(operation) end def update_class_and_instance_api_methods - openapi_document.paths.each do |path, path_item| - path_item.each do |http_method, operation| - next unless operation.is_a?(Scorpio::OpenAPI::Operation) + openapi_document.operations.each do |operation| method_name = api_method_name_by_operation(operation) if method_name # class method @@ -261,7 +259,6 @@ def update_class_and_instance_api_methods end end end - end end end