private ValidationEvent badType(Shape shape, Shape target, RelationshipType rel, ShapeType valid) {
        return error(shape,
                format(
                        "%s shape `%s` relationships must target a %s shape, but found %s",
                        shape.getType(),
                        rel.toString().toLowerCase(Locale.US),
                        valid,
                        target));
    }
Validates that neighbors target resolvable shapes of the correct type.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/TargetValidator.java