Home TypeKeyword Class
TypeKeyword Class
Cancel

TypeKeyword Class

Namespace: Json.Schema

Inheritance: TypeKeyword 🡒 object

Implemented interfaces:

  • IJsonSchemaKeyword

Handles type.

Fields

NameTypeSummary
NamestringThe JSON name of the keyword.

Properties

NameTypeSummary
TypeSchemaValueTypeThe expected type.

Constructors

TypeKeyword(SchemaValueType type)

Creates a new Json.Schema.TypeKeyword.

Declaration

1
public TypeKeyword(SchemaValueType type)
ParameterTypeDescription
typeSchemaValueTypeThe expected type.

TypeKeyword(params SchemaValueType[] types)

Creates a new Json.Schema.TypeKeyword.

Declaration

1
public TypeKeyword(params SchemaValueType[] types)
ParameterTypeDescription
typesparams SchemaValueType[]The expected types.

TypeKeyword(IEnumerable<SchemaValueType> types)

Creates a new Json.Schema.TypeKeyword.

Declaration

1
public TypeKeyword(IEnumerable<SchemaValueType> types)
ParameterTypeDescription
typesIEnumerable<SchemaValueType>The expected types.

Methods

GetConstraint(SchemaConstraint schemaConstraint, ReadOnlySpan<KeywordConstraint> localConstraints, EvaluationContext context)

Builds a constraint object for a keyword.

Declaration

1
public KeywordConstraint GetConstraint(SchemaConstraint schemaConstraint, ReadOnlySpan<KeywordConstraint> localConstraints, EvaluationContext context)
ParameterTypeDescription
schemaConstraintSchemaConstraintThe Json.Schema.SchemaConstraint for the schema object that houses this keyword.
localConstraintsReadOnlySpan<KeywordConstraint>The set of other Json.Schema.KeywordConstraints that have been processed prior to this one. Will contain the constraints for keyword dependencies.
contextEvaluationContextThe Json.Schema.EvaluationContext.

Returns

A constraint object.

Contents