Interface IJsonSchemaKeyword
Defines a keyword for JSON Schema.
Inherited Members
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public interface IJsonSchemaKeyword : IJsonSerializable, IEquatable<IJsonSchemaKeyword>
Properties
| Improve this Doc View SourceName
Gets the name of the keyword.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
SupportedVersions
Gets the versions (drafts) of JSON Schema which support this keyword.
Declaration
JsonSchemaVersion SupportedVersions { get; }
Property Value
| Type | Description |
|---|---|
| JsonSchemaVersion |
ValidationSequence
Gets the a value indicating the sequence in which this keyword will be evaluated.
Declaration
int ValidationSequence { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Vocabulary
Gets the vocabulary that defines this keyword.
Declaration
SchemaVocabulary Vocabulary { get; }
Property Value
| Type | Description |
|---|---|
| SchemaVocabulary |
Methods
| Improve this Doc View SourceRegisterSubschemas(SchemaValidationContext)
Used register any subschemas during validation. Enables look-forward compatibility with $ref keywords.
Declaration
void RegisterSubschemas(SchemaValidationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SchemaValidationContext | context | The context object. |
ResolveSubschema(JsonPointer, Uri, JsonSchemaVersion)
Resolves any subschemas during resolution of a $ref during validation.
Declaration
JsonSchema? ResolveSubschema(JsonPointer pointer, Uri baseUri, JsonSchemaVersion supportedVersions)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonPointer | pointer | A JsonPointer to the target schema. |
| System.Uri | baseUri | The current base URI. |
| JsonSchemaVersion | supportedVersions | Indicates the root schema's supported versions. |
Returns
| Type | Description |
|---|---|
| System.Nullable<JsonSchema> | The referenced schema, if it exists; otherwise null. |
Validate(SchemaValidationContext)
Provides the validation logic for this keyword.
Declaration
SchemaValidationResults Validate(SchemaValidationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SchemaValidationContext | context | The context object. |
Returns
| Type | Description |
|---|---|
| SchemaValidationResults | Results object containing a final result and any errors that may have been found. |