SchemaDefinitionExt extension Null safety Extensions

Extension on the SchemaDefinition class which provides a useful suite of methods to work with the SchemaDefinition class.

on

Methods

newDocument() SchemaDocument
Converts a SchemaDefinition to a base SchemaDocument with its fields being set to the associated SchemaKind from the underlying definition.
validate(SchemaDocument doc) bool
Validates if all fields of the provided doc match the SchemaDefinition fields.