Skip to content

Schema validation done on request body but not request parameters #2275

Closed Answered by kstich
himan085 asked this question in Q&A
Discussion options

You must be logged in to vote

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):

For validation, API Gateway verifies either or both of the following conditions:

  • The required request parameters in the URI, query string, and headers of an incoming request are included and not blank.
  • The applicable request payload adheres to the configured JSON schema request model of the method.

These correspond to the params-only (first bullet) and

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kstich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants