schemake library
Schemake is a library to describe schemas for data. These schemas are useful on their own as they allow validating JSON/YAML objects and then using them safely dynamically or by manually writing types to convert them without having to perform further validation.
Schemake schemas may also be used for code generation. The dart_gen library of this package can generate Dart code, for example.
Classes
-
Arrays<
S, T extends SchemaType< S> > - The Schemake type matching a Dart List.
- Bools
- The Schemake type matching a Dart bool.
- Enums
- A Schemake type that enforces that only certain String values may be provided.
- EnumValidator
- FloatRangeValidator
- Floats
- The Schemake type matching a Dart double.
- IntRangeValidator
- Ints
- The Schemake type matching a Dart int.
-
Maps<
V, T extends SchemaType< V> > -
A Schemake type matching a Dart Map from String to some known type
V
. - NonBlankStringValidator
-
NonNull<
T> - A non-null type.
-
Nullable<
S, T extends NonNull< S> > - A nullable type.
- Objects
- The Schemake type matching a Dart Map, but providing a schema for its entries (similar to a class in languages like Dart and Java).
-
ObjectsBase<
T> - A Schemake type matching a Dart Map from String to any other type.
-
Property<
T> - A property of a structured data object.
-
SchemaType<
T> - The supertype of all Schemake types.
- Strings
- The Schemake type matching a Dart String.
-
Validatable<
T> - A validatable Schemake type.
-
Validator<
T> -
A validator for values of type
T
.
Enums
- UnknownPropertiesStrategy
- A strategy for dealing with unknown properties in data structures. See Objects for details.