0.0.6 • Published 6 years ago
@deepest-lore/validator v0.0.6
@deepest-lore/validator

Validates that deepest-lore schemas (and optionally data) are consistent with themselves and one another.
Checks performed
Errors raised on failure
- All entity reference columns reference an existing entity type.
- All entity reference column defaults refer to an existing instance of their referenced entity type.
- All entity reference column values refer to an existing instance of their referenced entity type.
- All mapping keys reference existing entity types in schema.
- All mapping keys reference existing entity instances of their referenced entity type in data.
- All entity type labels are resolvable; each run is a chain of existing entity reference columns, excepting the last, which is any existing column on the final entity.
- All localized values include every localization defined at the root of the schema document.
- All integer column maximum values are at least their minimum values.
- All integer column default values fall between (inclusively) their minimum and maximum values.
- All integer column values fall between (inclusively) their minimum and maximum values.
- All float column maximum values are at least their minimum values.
- All float column default values fall between (inclusively) their minimum and maximum values.
- All float column values fall between (inclusively) their minimum and maximum values.
- All string column default values fit within their maximum length.
- All string column values fit within their maximum length.
Warnings raised on failure.
- Localized values include no localizations not defined at the root of the schema document.
- No unexpected columns are found within entity type or mapping data.
- All entity types have at least one instance.
- All mappings have at least one instance.