Menu
Amazon API Gateway
Developer Guide

x-amazon-apigateway-request-validators Object

Defines the supported request validators for the containing API as a map between a validator name and the associated request validation rules. This extension applies to an API.

Properties

Property Name Type Description

request_validator_name

x-amazon-apigateway-request-validators.requestValidator

Specifies the validation rules consisting of the named validator. For example:

Copy
"basic" : { "validateRequestBody" : true, "validateRequestParameters" : true },

To apply this validator to a specific method, reference the validator name (basic) as the value of the x-amazon-apigateway-request-validator property.

x-amazon-apigateway-request-validators Example

The following example shows a set of request validators for an API as a map between a validator name and the associated request validation rules.

Copy
{ "swagger": "2.0", ... "x-amazon-apigateway-request-validators" : { "basic" : { "validateRequestBody" : true, "validateRequestParameters" : true }, "params-only" : { "validateRequestBody" : false, "validateRequestParameters" : true } }, ... }