-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
implement apigw Model validation if in use by a Method #7872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ea9006d
to
e1f6be5
Compare
25ed6ec
to
aceccb0
Compare
476e2d8
to
59fc4a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this validation @bentsku - and as usual, kudos for the comprehensive snapshot tests! 🚀
I only have one comment about using a computed property/function rather than storing redundant mappings, otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This PR implements the validation when deleting a
Model
resource: it will check if it's in use in any Method of the RestAPI, and it is, will reject the call. This allows us to not have any integration calling a non existing Model anymore.This logic will also be applied to
RequestValidator
, and maybe some other resources. We will extract the logic then into something more general when applying it to other resources.