@Override
    protected void check(StringShape shape, StringNode node, Context context, Emitter emitter) {
        shape.getTrait(EnumTrait.class).ifPresent(trait -> {
            List<String> values = trait.getEnumDefinitionValues();
            if (!values.contains(node.getValue())) {
                emitter.accept(node,
                        String.format(
                                "String value provided for `%s` must be one of the following values: %s",
                                shape.getId(),
                                ValidationUtils.tickedList(values)));
            }
        });
    }
Validates the enum trait on string shapes.
smithy-model/src/main/java/software/amazon/smithy/model/validation/node/StringEnumPlugin.java