Class NodeValidationVisitor
- java.lang.Object
-
- software.amazon.smithy.model.validation.NodeValidationVisitor
-
- All Implemented Interfaces:
ShapeVisitor<java.util.List<ValidationEvent>>
public final class NodeValidationVisitor extends java.lang.Object implements ShapeVisitor<java.util.List<ValidationEvent>>
ValidatesNode
values provided forShape
definitions.This visitor validator is used to ensure that values provided for custom traits and examples are correct for their schema definitions. A map of shape types to a list of additional validators can be provided to perform additional, non-standard, validation of these values. For example, this can be used to provide additional validation needed for custom traits that are applied to the shape of the data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeValidationVisitor.Builder
Builds aNodeValidationVisitor
.-
Nested classes/interfaces inherited from interface software.amazon.smithy.model.shapes.ShapeVisitor
ShapeVisitor.Default<R>
-
-
Method Summary
-
-
-
Method Detail
-
builder
public static NodeValidationVisitor.Builder builder()
-
blobShape
public java.util.List<ValidationEvent> blobShape(BlobShape shape)
- Specified by:
blobShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
booleanShape
public java.util.List<ValidationEvent> booleanShape(BooleanShape shape)
- Specified by:
booleanShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
byteShape
public java.util.List<ValidationEvent> byteShape(ByteShape shape)
- Specified by:
byteShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
shortShape
public java.util.List<ValidationEvent> shortShape(ShortShape shape)
- Specified by:
shortShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
integerShape
public java.util.List<ValidationEvent> integerShape(IntegerShape shape)
- Specified by:
integerShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
longShape
public java.util.List<ValidationEvent> longShape(LongShape shape)
- Specified by:
longShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
bigIntegerShape
public java.util.List<ValidationEvent> bigIntegerShape(BigIntegerShape shape)
- Specified by:
bigIntegerShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
floatShape
public java.util.List<ValidationEvent> floatShape(FloatShape shape)
- Specified by:
floatShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
documentShape
public java.util.List<ValidationEvent> documentShape(DocumentShape shape)
- Specified by:
documentShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
doubleShape
public java.util.List<ValidationEvent> doubleShape(DoubleShape shape)
- Specified by:
doubleShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
bigDecimalShape
public java.util.List<ValidationEvent> bigDecimalShape(BigDecimalShape shape)
- Specified by:
bigDecimalShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
stringShape
public java.util.List<ValidationEvent> stringShape(StringShape shape)
- Specified by:
stringShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
timestampShape
public java.util.List<ValidationEvent> timestampShape(TimestampShape shape)
- Specified by:
timestampShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
listShape
public java.util.List<ValidationEvent> listShape(ListShape shape)
- Specified by:
listShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
setShape
public java.util.List<ValidationEvent> setShape(SetShape shape)
- Specified by:
setShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
mapShape
public java.util.List<ValidationEvent> mapShape(MapShape shape)
- Specified by:
mapShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
structureShape
public java.util.List<ValidationEvent> structureShape(StructureShape shape)
- Specified by:
structureShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
unionShape
public java.util.List<ValidationEvent> unionShape(UnionShape shape)
- Specified by:
unionShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
memberShape
public java.util.List<ValidationEvent> memberShape(MemberShape shape)
- Specified by:
memberShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
operationShape
public java.util.List<ValidationEvent> operationShape(OperationShape shape)
- Specified by:
operationShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
resourceShape
public java.util.List<ValidationEvent> resourceShape(ResourceShape shape)
- Specified by:
resourceShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
serviceShape
public java.util.List<ValidationEvent> serviceShape(ServiceShape shape)
- Specified by:
serviceShape
in interfaceShapeVisitor<java.util.List<ValidationEvent>>
-
-