Show / Hide Table of Contents

Class BodyValidationRequestPolicy

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

Inheritance
object
BodyValidationRequestPolicy
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.ApigatewayService.Models
Assembly: OCI.DotNetSDK.Apigateway.dll
Syntax
public class BodyValidationRequestPolicy

Properties

Content

Declaration
[Required(ErrorMessage = "Content is required.")]
[JsonProperty(PropertyName = "content")]
public Dictionary<string, ContentValidation> Content { get; set; }
Property Value
Type Description
Dictionary<string, ContentValidation>

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. text/plain overrides text/*

Remarks

Required

Required

Declaration
[JsonProperty(PropertyName = "required")]
public bool? Required { get; set; }
Property Value
Type Description
bool?

Determines if the request body is required in the request.

ValidationMode

Declaration
[JsonProperty(PropertyName = "validationMode")]
[JsonConverter(typeof(ResponseEnumConverter))]
public BodyValidationRequestPolicy.ValidationModeEnum? ValidationMode { get; set; }
Property Value
Type Description
BodyValidationRequestPolicy.ValidationModeEnum?

Validation behavior mode.
In ENFORCING mode, upon a validation failure, the request will be rejected with a 4xx response and not sent to the backend.
In PERMISSIVE mode, the result of the validation will be exposed as metrics while the request will follow the normal path.
DISABLED type turns the validation off.

In this article
Back to top