x-amazon-apigateway-request-validators object - Amazon API Gateway

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 a REST API.

Property name Type Description

request_validator_name

x-amazon-apigateway-request-validators.requestValidator object

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

"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 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.

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