Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rondineli Gomes de Araujo committed Sep 13, 2022
1 parent bc5e1a2 commit b0c30fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions samtranslator/model/eventsources/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,13 +832,12 @@ def _add_swagger_integration(self, api, function, intrinsics_resolver):

if self.RequestValidators:
# default is no Validators
validators = {"ValidateBody": None, "ValidateParameters": None}
# if we have validator configured to a request parameter
# we want to add it to the editor but remove it from original dict before it iterates
validators["ValidateBody"] = self.RequestValidators.get("ValidateBody")
validators["ValidateParameters"] = self.RequestValidators.get("ValidateParameters")
# If validators is present or not, this method will handle the check
self._add_validators(editor, validators["ValidateBody"], validators["ValidateParameters"])
self._add_validators(
editor, self.RequestValidators.get("ValidateBody"), self.RequestValidators.get("ValidateParameters")
)

if self.RequestParameters:

Expand Down

0 comments on commit b0c30fd

Please sign in to comment.