-
Hi, I've created a Smithy model for a resource with few constraints on the attributes. The OpenAPI schema generated after the build is being used in the AWS API Gateway. The constraints (traits) applied on the attributes are being validated for a create operation: HTTP Is there anything we need to do additionally to enable validation on the request parameters (GET) ? The validtaions on the request body (POST) worked out of the box. Sample structure:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem here is a gap in API Gateway's built-in validation. You should always be performing your own service-side validation of request values. Path/Query/Header parameter JSON Schema based validations are not supported by API Gateway. In the API Gateway documentation for request validation, they state the following (emphasis added):
These correspond to the |
Beta Was this translation helpful? Give feedback.
The problem here is a gap in API Gateway's built-in validation. You should always be performing your own service-side validation of request values.
Path/Query/Header parameter JSON Schema based validations are not supported by API Gateway. In the API Gateway documentation for request validation, they state the following (emphasis added):
These correspond to the
params-only
(first bullet) and…