Class ModelJmespathUtils
java.lang.Object
software.amazon.smithy.model.jmespath.node.ModelJmespathUtils
Provides utilities for working with JMESPath expressions in the context of a Smithy model.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for "JmespathEventDanger", a default validation event ID segment.static final StringConstant for "JmespathProblem", a default validation event ID segment.static final StringConstant for "JmespathEventWarning", a default validation event ID segment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LinterResultlint(Model model, Shape shape, JmespathExpression expression) Lint the expression using static analysis.static LiteralExpressionsampleShapeValue(Model model, Shape shape) Creates a sampleLiteralExpressionvalue that is a valid value of the given shape, orLiteralExpression.ANYif the shape is null.
-
Field Details
-
JMES_PATH_PROBLEM
Constant for "JmespathProblem", a default validation event ID segment.- See Also:
-
JMES_PATH_DANGER
Constant for "JmespathEventDanger", a default validation event ID segment.- See Also:
-
JMES_PATH_WARNING
Constant for "JmespathEventWarning", a default validation event ID segment.- See Also:
-
-
Constructor Details
-
ModelJmespathUtils
public ModelJmespathUtils()
-
-
Method Details
-
lint
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
Creates a sampleLiteralExpressionvalue that is a valid value of the given shape, orLiteralExpression.ANYif the shape is null.
-