Class AllOfKeyword
Defines the allOf
JSON Schema keyword.
Implements
Inherited Members
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public class AllOfKeyword : List<JsonSchema>, IList<JsonSchema>, ICollection<JsonSchema>, IReadOnlyList<JsonSchema>, IReadOnlyCollection<JsonSchema>, IEnumerable<JsonSchema>, IList, ICollection, IEnumerable, IJsonSchemaKeyword, IJsonSerializable, IEquatable<IJsonSchemaKeyword>, IEquatable<AllOfKeyword>
Properties
| Improve this Doc View SourceErrorTemplate
Gets or sets the error message template.
Declaration
public static string ErrorTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Supports the following tokens:
- failed
- total
Name
Gets the name of the keyword.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
SupportedVersions
Gets the versions (drafts) of JSON Schema which support this keyword.
Declaration
public JsonSchemaVersion SupportedVersions { get; }
Property Value
Type | Description |
---|---|
JsonSchemaVersion |
ValidationSequence
Gets the a value indicating the sequence in which this keyword will be evaluated.
Declaration
public int ValidationSequence { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Vocabulary
Gets the vocabulary that defines this keyword.
Declaration
public SchemaVocabulary Vocabulary { get; }
Property Value
Type | Description |
---|---|
SchemaVocabulary |
Methods
| Improve this Doc View SourceEquals(Nullable<AllOfKeyword>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(AllOfKeyword? other)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<AllOfKeyword> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Nullable<IJsonSchemaKeyword>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(IJsonSchemaKeyword? other)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<IJsonSchemaKeyword> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Nullable<Object>)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified object is equal to the current object; otherwise, false. |
FromJson(JsonValue, JsonSerializer)
Builds an object from a JsonValue.
Declaration
public void FromJson(JsonValue json, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonValue | json | The JsonValue representation of the object. |
JsonSerializer | serializer | The JsonSerializer instance to use for additional serialization of values. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
Overrides
RegisterSubschemas(SchemaValidationContext)
Used register any subschemas during validation. Enables look-forward compatibility with $ref
keywords.
Declaration
public 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
public 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. |
ToJson(JsonSerializer)
Converts an object to a JsonValue.
Declaration
public JsonValue ToJson(JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
JsonSerializer | serializer | The JsonSerializer instance to use for additional serialization of values. |
Returns
Type | Description |
---|---|
JsonValue | The JsonValue representation of the object. |
Validate(SchemaValidationContext)
Provides the validation logic for this keyword.
Declaration
public 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. |