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.
  • Method Details

    • validate

      public List<ValidationEvent> validate(Model model)
      Description copied from interface: Validator
      Validates a model and returns a list of validation events.
      Parameters:
      model - Model to validate.
      Returns:
      List of validation events.