Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace BodyValidationRequestPolicy

Validate the payload body of the incoming API requests on a specific route.

Properties

content

content: object

The content of the request body. The key is a media type range subset restricted to the following schema

key ::= ( / ( \"*\" \"/\" \"*\" ) / ( type \"/\" \"*\" ) / ( type \"/\" subtype ) )

For requests that match multiple keys, only the most specific key is applicable. e.g. {@code text/plain} overrides {@code text/*}

Type declaration

Optional required

required: undefined | false | true

Determines if the request body is required in the request.

Optional validationMode

validationMode: ValidationMode

Validation behavior mode.

In {@code ENFORCING} mode, upon a validation failure, the request will be rejected with a 4xx response and not sent to the backend.

In {@code PERMISSIVE} mode, the result of the validation will be exposed as metrics while the request will follow the normal path.

{@code DISABLED} type turns the validation off.

Functions

getDeserializedJsonObj

getJsonObj