Show / Hide Table of Contents

Class SchemaValidationContext

Used to track data throughout the validation process.

Inheritance
System.Object
SchemaValidationContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public class SchemaValidationContext

Constructors

| Improve this Doc View Source

SchemaValidationContext(SchemaValidationContext)

Creates a new instance of the SchemaValidationContext class by copying values from another instance.

Declaration
public SchemaValidationContext(SchemaValidationContext source)
Parameters
Type Name Description
SchemaValidationContext source

Properties

| Improve this Doc View Source

BaseRelativeLocation

Gets or sets the current schema location relative to the current base URI (BaseUri).

Declaration
public JsonPointer? BaseRelativeLocation { get; set; }
Property Value
Type Description
System.Nullable<JsonPointer>
| Improve this Doc View Source

BaseUri

Gets or sets the base URI at this point in the validation.

Declaration
public Uri? BaseUri { get; set; }
Property Value
Type Description
System.Nullable<System.Uri>
| Improve this Doc View Source

EvaluatedPropertyNames

Gets a list of property names that have been evaluated in this validation pass.

Declaration
public HashSet<string> EvaluatedPropertyNames { get; }
Property Value
Type Description
System.Collections.Generic.HashSet<System.String>
| Improve this Doc View Source

Instance

Gets or sets the instance being validated.

Declaration
public JsonValue Instance { get; set; }
Property Value
Type Description
JsonValue
| Improve this Doc View Source

InstanceLocation

Gets or sets the current instance location.

Declaration
public JsonPointer InstanceLocation { get; set; }
Property Value
Type Description
JsonPointer
| Improve this Doc View Source

IsMetaSchemaValidation

Gets or sets whether the current validation run is for a meta-schema.

Declaration
public bool IsMetaSchemaValidation { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LastEvaluatedIndex

Gets the last array index that has been evaluated in this validation pass.

Declaration
public int LastEvaluatedIndex { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Local

Gets or sets the local schema at this point in the validation.

Declaration
public JsonSchema Local { get; set; }
Property Value
Type Description
JsonSchema
| Improve this Doc View Source

LocallyEvaluatedPropertyNames

Gets a list of property names that have been evaluated on the current tier of this validation pass.

Declaration
public HashSet<string> LocallyEvaluatedPropertyNames { get; }
Property Value
Type Description
System.Collections.Generic.HashSet<System.String>
| Improve this Doc View Source

LocallyValidatedIndices

Gets a list of array indices that have been evaluated on the current tier of this validation pass. Used for keywords that can peer into siblings, like unevaluatedItems.

Declaration
public HashSet<int> LocallyValidatedIndices { get; }
Property Value
Type Description
System.Collections.Generic.HashSet<System.Int32>
| Improve this Doc View Source

LocalTierLastEvaluatedIndex

Gets the last array index that has been evaluated on the current tier of this validation pass.

Declaration
public int LocalTierLastEvaluatedIndex { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Misc

Miscellaneous data. Useful for communicating results between keywords.

Declaration
public Dictionary<string, object> Misc { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Object>
Remarks

Use ValidationSequence to ensure that keywords are processed in the correct order so that the communication occurs properly.

| Improve this Doc View Source

Options

Gets the schema options for the current validation pass.

Declaration
public JsonSchemaOptions Options { get; }
Property Value
Type Description
JsonSchemaOptions
| Improve this Doc View Source

RecursiveAnchor

Gets or sets the recursive anchor (root).

Declaration
public JsonSchema? RecursiveAnchor { get; set; }
Property Value
Type Description
System.Nullable<JsonSchema>
| Improve this Doc View Source

RelativeLocation

Gets or sets the current schema keyword location relative to the original schema root.

Declaration
public JsonPointer RelativeLocation { get; set; }
Property Value
Type Description
JsonPointer
| Improve this Doc View Source

Root

Gets or sets the root schema when validation begins.

Declaration
public JsonSchema Root { get; set; }
Property Value
Type Description
JsonSchema
| Improve this Doc View Source

ShouldTrackValidatedValues

Get or set if the validations for this context should track which values have been validated.

Declaration
public bool ShouldTrackValidatedValues { get; set; }
Property Value
Type Description
System.Boolean
Remarks

By default, this is set to true if any keywords present in the schema implement IRequireAnnotations.

| Improve this Doc View Source

ValidatedIndices

Gets a list of array indices that have been evaluated in this validation pass. Used for keywords that can peer into siblings, like unevaluatedItems.

Declaration
public HashSet<int> ValidatedIndices { get; }
Property Value
Type Description
System.Collections.Generic.HashSet<System.Int32>

Methods

| Improve this Doc View Source

UpdateEvaluatedPropertiesAndItemsFromSubschemaValidation(SchemaValidationContext)

Updates the EvaluatedPropertyNames, LocallyEvaluatedPropertyNames, LastEvaluatedIndex, and LocalTierLastEvaluatedIndex properties based on another context that processed a subschema.

Declaration
public void UpdateEvaluatedPropertiesAndItemsFromSubschemaValidation(SchemaValidationContext other)
Parameters
Type Name Description
SchemaValidationContext other

Another context object.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX