-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws-apigateway: requestValidatorOptions does not create validator #29834
Comments
Hi @anneadb , thanks for reaching out. You could try creating a resource and then use Here is snippet of successful implementation of the requestValidator with LambdarestApi- Please feel free to reach out if this does not work for you. |
Hi @khushail , |
Sharing the complete code. I kept
` |
Thank you for the entire code. |
@anneadb are you still facing the issue ? |
Hi @khushail , |
I am having the same issue as @anneadb and I am using 2.161.0
|
Describe the bug
I am trying to add a request validator to my Lambda proxy API. I am setting
requestValidatorOptions
indefaultMethodOptions
but no validator is being created and added to the methods.In the UI/console I can add a validation to the "ANY" method which is automatically created as part of
LambdaRestApi
.Is there another way to add the validator to the proxy?
Expected Behavior
Validator is created and added to all methods.
Current Behavior
The cloudformation template shows the RequestParameters but no validator. Adding
requestValidatorOptions
is not recognized as a change during deployment.Reproduction Steps
Create an api gateway using
LambdaRestApi
:Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.122.0
Framework Version
No response
Node.js Version
v20.10.0
OS
macOS 14.4.1
Language
TypeScript
Language Version
No response
Other information
"AWS::ApiGateway::Method" from template.json:
The text was updated successfully, but these errors were encountered: