private Set<ShapeId> computePotentialReferences(Model model, MemberShape member) {
        // Exclude any resources already in `@references` on the member or container structure.
        Set<ShapeId> resourcesToIgnore = new HashSet<>();
        ignoreReferencedResources(member, resourcesToIgnore);
        ignoreReferencedResources(model.expectShape(member.getContainer()), resourcesToIgnore);

        // Check each resource in the model for something missed.
        Set<ShapeId> potentialResources = new HashSet<>();
        for (ResourceShape resource : model.getResourceShapes()) {
            // We'll want to ignore some resources based on the member -> resource path.
            computeResourcesToIgnore(model, member, resource, resourcesToIgnore);

            // Exclude members bound to resource hierarchies from generating events,
            // including for resources that are within the same hierarchy.
            if (resourcesToIgnore.contains(resource.getId())) {
                continue;
            }

            // This member matches the identifier for the resource we're checking, add it to a list.
            if (isIdentifierMatch(resource, member)) {
                potentialResources.add(resource.getId());
            }
        }

        // Clean up any resources added through other paths that should be ignored.
        potentialResources.removeAll(resourcesToIgnore);
        return potentialResources;
    }
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