IValidationContext Interface

Definition

Constrained interface used to provide context to rule implementation

public interface IValidationContext
type IValidationContext = interface
Public Interface IValidationContext
Derived

Properties

PathString

Pointer to source of validation error in document

Methods

AddError(OpenApiValidatorError)

Register an error with the validation context.

AddWarning(OpenApiValidatorWarning)

Register a warning with the validation context.

Enter(String)

Allow Rule to indicate validation error occured at a deeper context level.

Exit()

Exit from path context elevel. Enter and Exit calls should be matched.

Extension Methods

CreateError(IValidationContext, String, String)

Helper method to simplify validation rules

CreateWarning(IValidationContext, String, String)

Helper method to simplify validation rules

Applies to