Class ModelJmespathUtils

java.lang.Object
software.amazon.smithy.model.jmespath.node.ModelJmespathUtils

public final class ModelJmespathUtils extends Object
Provides utilities for working with JMESPath expressions in the context of a Smithy model.
  • Field Details

    • JMES_PATH_PROBLEM

      public static final String JMES_PATH_PROBLEM
      Constant for "JmespathProblem", a default validation event ID segment.
      See Also:
    • JMES_PATH_DANGER

      public static final String JMES_PATH_DANGER
      Constant for "JmespathEventDanger", a default validation event ID segment.
      See Also:
    • JMES_PATH_WARNING

      public static final String JMES_PATH_WARNING
      Constant for "JmespathEventWarning", a default validation event ID segment.
      See Also:
  • Constructor Details

    • ModelJmespathUtils

      public ModelJmespathUtils()
  • Method Details

    • lint

      public static LinterResult lint(Model model, Shape shape, JmespathExpression expression)
      Lint the expression using static analysis.
      Parameters:
      shape - The shape the current node will be a value of.
      Returns:
      Returns the problems that were detected.
    • sampleShapeValue

      public static LiteralExpression sampleShapeValue(Model model, Shape shape)
      Creates a sample LiteralExpression value that is a valid value of the given shape, or LiteralExpression.ANY if the shape is null.