SchemaValidator class

Validates JSON-LD schemas for common issues at development time.

This is NOT a replacement for Google's Rich Results Test, but catches basic problems before you even deploy.

final results = SchemaValidator.validate(mySchema);
for (final issue in results) {
  print('${issue.severity}: ${issue.message}');
}

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

validate(JsonLdSchema schema) List<ValidationIssue>
Validate a JSON-LD schema and return a list of issues found.
validateAndPrint(JsonLdSchema schema) → void
Validate and print results (convenience for development)