private ValidationEvent inputOutputWithErrorTrait(Shape shape, Shape target, RelationshipType rel) {
        String descriptor = rel == RelationshipType.INPUT ? "input" : "output";
        return error(shape,
                format(
                        "Operation %s targets an invalid structure `%s` that is marked with the `error` trait.",
                        descriptor,
                        target.getId()));
    }
Validates that neighbors target resolvable shapes of the correct type.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/TargetValidator.java