private void computeResourcesToIgnore(
            Model model,
            MemberShape member,
            ResourceShape resource,
            Set<ShapeId> resourcesToIgnore
    ) {
        // Exclude actually bound members via searching with a PathFinder.
        List<PathFinder.Path> resourceMemberPaths = PathFinder.create(model)
                .search(resource, ListUtils.of(member));
        if (!resourceMemberPaths.isEmpty()) {
            // This member is already bound to a resource, so we don't need a references trait for it.
            // In addition, we should not tell users to add a references trait for other resources that
            // are children in that hierarchy - any parent resources or other children of those parents.
            for (PathFinder.Path path : resourceMemberPaths) {
                for (Shape pathShape : path.getShapes()) {
                    if (pathShape.isResourceShape()) {
                        ResourceShape resourceShape = (ResourceShape) pathShape;
                        resourcesToIgnore.add(resourceShape.getId());
                        resourcesToIgnore.addAll(resourceShape.getResources());
                    }
                }
            }
        }
    }
Validates if a member matches a resource identifier without the
proper configuration of a `@references` trait.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/MemberShouldReferenceResourceValidator.java