in cfn-lint-serverless/cfn_lint_serverless/rules/api_gateway.py [0:0]
def _match_rest_api(self, key: str, value: dict) -> List[RuleMatch]:
"""
Match for REST API
"""
method_settings = [
ms
for ms in value.get("Properties", {}).get("MethodSettings", [])
if ms.get("HttpMethod") == "*" and ms.get("ResourcePath") == "/*"
] or [{}]
default_method_setting = method_settings[0]
if "ThrottlingBurstLimit" not in default_method_setting or "ThrottlingRateLimit" not in default_method_setting:
return [RuleMatch(["Resources", key], self._message_method_settings.format(key))]
return []