Class IdRefPlugin
- java.lang.Object
-
- software.amazon.smithy.model.validation.node.IdRefPlugin
-
- All Implemented Interfaces:
NodeValidatorPlugin
public final class IdRefPlugin extends java.lang.Object
Validates that the value contained in a string shape is a valid shape ID and that the shape ID targets a shape that is in the set of shapes matching the selector.Relative shape IDs may resolve to public prelude shapes if they don't resolve to shapes defined in the same namespace as the ID.
-
-
Constructor Summary
Constructors Constructor Description IdRefPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
apply(Shape shape, Node value, ShapeIndex index)
Applies the plugin to the given shape, node value, and shape index.protected java.util.List<java.lang.String>
check(Shape shape, IdRefTrait trait, StringNode node, ShapeIndex index)
-
-
-
Method Detail
-
check
protected java.util.List<java.lang.String> check(Shape shape, IdRefTrait trait, StringNode node, ShapeIndex index)
-
apply
public final java.util.List<java.lang.String> apply(Shape shape, Node value, ShapeIndex index)
Description copied from interface:NodeValidatorPlugin
Applies the plugin to the given shape, node value, and shape index.- Specified by:
apply
in interfaceNodeValidatorPlugin
- Parameters:
shape
- Shape being checked.value
- Value being evaluated.index
- Shape index used to traverse the model.- Returns:
- Returns any validation messages that were encountered.
-
-