Skip to content

Commit

Permalink
Break compatibility on purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
aahung committed Feb 9, 2023
1 parent 60192c4 commit 5748050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samtranslator/open_api/base_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def method_has_integration(self, raw_method_definition: Dict[str, Any], path: st
return True
return False

def make_path_conditional(self, path: str, condition: str) -> None:
def make_path_conditional__(self, path: str, condition: str) -> None:
"""
Wrap entire API path definition in a CloudFormation if condition.
:param path: path name
Expand Down
4 changes: 2 additions & 2 deletions samtranslator/plugins/api/implicit_api_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,13 @@ def _maybe_add_conditions_to_implicit_api_paths(self, template): # type: ignore
all_methods_contain_conditions = None not in all_method_conditions
if at_least_one_method and all_methods_contain_conditions:
if len(all_method_conditions) == 1:
editor.make_path_conditional(path, all_method_conditions.pop())
editor.make_path_conditional__(path, all_method_conditions.pop())
else:
path_condition_name = self._path_condition_name(api_id, path) # type: ignore[no-untyped-call]
self._add_combined_condition_to_template( # type: ignore[no-untyped-call]
template.template_dict, path_condition_name, all_method_conditions
)
editor.make_path_conditional(path, path_condition_name)
editor.make_path_conditional__(path, path_condition_name)

api.properties["DefinitionBody"] = self._get_api_definition_from_editor(editor) # type: ignore[no-untyped-call] # TODO make static method
template.set(api_id, api)
Expand Down

0 comments on commit 5748050

Please sign in to comment.