Class ReservedWordsValidator

java.lang.Object
software.amazon.smithy.model.validation.AbstractValidator
software.amazon.smithy.linters.ReservedWordsValidator
All Implemented Interfaces:
software.amazon.smithy.model.validation.Validator

public final class ReservedWordsValidator extends software.amazon.smithy.model.validation.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 final class 
    ReservedWords validator configuration.
    static final class 
     
    static final class 
    A single reserved words configuration.
  • Field Summary

    Fields inherited from interface software.amazon.smithy.model.validation.Validator

    MODEL_DEPRECATION, MODEL_ERROR
  • Method Summary

    Modifier and Type
    Method
    Description
    List<software.amazon.smithy.model.validation.ValidationEvent>
    validate(software.amazon.smithy.model.Model model)
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • validate

      public List<software.amazon.smithy.model.validation.ValidationEvent> validate(software.amazon.smithy.model.Model model)