hi @jayair I think this would be useful as an example as I wasn’t aware of it and encourages good practice in my eyes.
I am using your api and resource pack to use and i’ve done the following:
list:
# Defines an HTTP API endpoint that calls the main function in list.js
# - path: url path is /deals
# - method: GET request
handler: list.main
events:
- http:
path: deals
method: get
cors: true
authorizer: aws_iam
request:
parameters:
querystrings:
country: true
type: true
categoryId: true
yearMonth: true
batchLimit: true
However, I found out validation was not turned on. From googling it seems you can do this:
Resources:
ParameterRequestValidator:
Type: AWS::ApiGateway::RequestValidator
Properties:
Name: ParameterRequestValidator
RestApiId:
Ref: ApiGatewayRestApi
ValidateRequestBody: false
ValidateRequestParameters: true
ApiGatewayMethodNameOfYourApiLookItUpInYourTemplate:
Properties:
RequestValidatorId:
Ref: ParameterRequestValidator
How can I implement this into your code base?
Thanks, S.