Package software.amazon.smithy.linters
Class ReservedWordsValidator
- java.lang.Object
-
- software.amazon.smithy.model.validation.AbstractValidator
-
- software.amazon.smithy.linters.ReservedWordsValidator
-
- All Implemented Interfaces:
Validator
public final class ReservedWordsValidator extends AbstractValidator
Emits validation events for a configuration of reserved words.This validator accepts the following optional configuration options:
- reserved: ([object]) A list of reserved word configuration
objects as follows:
- words: ([string]) A list of words that are case-insensitively reserved. Leading and trailing wildcards ("*") are supported.
- terms: ([string]) A list of word boundary terms to test.
- selector: (string) Specifies a selector for this configuration. Defaults to validating all shapes, including member names.
- reason: (string) A reason to display for why this set of words is reserved.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReservedWordsValidator.ConfigReservedWords validator configuration.static classReservedWordsValidator.Providerstatic classReservedWordsValidator.ReservedWordsA single reserved words configuration.
-
Field Summary
-
Fields inherited from interface software.amazon.smithy.model.validation.Validator
MODEL_DEPRECATION, MODEL_ERROR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ValidationEvent>validate(Model model)Validates a model and returns a list of validation events.-
Methods inherited from class software.amazon.smithy.model.validation.AbstractValidator
createEvent, createEvent, createEvent, createEvent, danger, danger, danger, danger, danger, danger, danger, danger, error, error, error, error, error, error, error, error, getName, note, note, note, note, note, note, note, note, warning, warning, warning, warning, warning, warning, warning, warning
-
-
-
-
Method Detail
-
validate
public java.util.List<ValidationEvent> validate(Model model)
Description copied from interface:ValidatorValidates a model and returns a list of validation events.- Parameters:
model- Model to validate.- Returns:
- List of validation events.
-
-