lib/awspec/helper/finder/apigateway.rb in awspec-1.18.6 vs lib/awspec/helper/finder/apigateway.rb in awspec-1.19.0

- old
+ new

@@ -20,8 +20,16 @@ apis.each do |api| return api if api.name == name end nil end + + def find_api_resources_by_id(api_id) + all_resources = [] + apigateway_client.get_resources(rest_api_id: api_id, limit: 500, embed: ['methods']).each do |response| + all_resources += response.items + end + all_resources != [] ? all_resources : nil + end end end end