public final class ShouldHaveUsedTimestampValidator extends AbstractValidator
Validates that shapes that have names that appear to be time values are actually modeled with a timestamp shape.
This validator will check the name of string, integer, float, and long
shapes to see if they should have been TimestampShape
.
It also scans structure members and union members. It uses the member name
and ensures the member targets a timestamp shape.
When considering if a name indicates a possible timestamp, the name must have one of the following qualities:
When checking for one of the above words, the first character may be upper or lower-cased. Words a separated by underscores or a pair of lower-then-upper-cased characters, i.e. wordWord.
Modifier and Type | Class and Description |
---|---|
static class |
ShouldHaveUsedTimestampValidator.Config |
static class |
ShouldHaveUsedTimestampValidator.Provider |
MODEL_ERROR
Modifier and Type | Method and Description |
---|---|
java.util.List<ValidationEvent> |
validate(Model model)
Validates a model and returns a list of validation events.
|
createEvent, createEvent, danger, danger, error, error, getName, note, note, warning, warning
public java.util.List<ValidationEvent> validate(Model model)
Validator
model
- Model to validate.