Calling the constructor for RequestValidatorOptions multiple times gives an error
There is already a Construct with name 'validator' in RestApi
`
resource1.add_method(
http_method='POST',
integration=xxxIntegration,
request_parameters={
'method.request.header.passcode': True,
'method.request.header.message': True
},
request_validator_options=_apigw.RequestValidatorOptions(validate_request_parameters=True, request_validator_name='POST-r1-validator')
)
resource2.add_method(
http_method='POST',
integration=yyyIntegration,
request_parameters={
'method.request.header.passcode': True,
'method.request.querystring.id': True
},
request_validator_options=_apigw.RequestValidatorOptions(validate_request_parameters=True,request_validator_name='POST-r2-validator')
)
`
This is :bug: Bug Report
Thanks for filing this @durja. This is, in fact, a bug on the CDK.
You can workaround this by using the requestValidator property.
Most helpful comment
Thanks for filing this @durja. This is, in fact, a bug on the CDK.
You can workaround this by using the
requestValidatorproperty.