private List<ValidationEvent> validateRegionalEndpointPatterns(
            ServiceShape serviceShape,
            StandardRegionalEndpointsTrait regionalEndpoints
    ) {
        List<ValidationEvent> events = new ArrayList<>();

        for (List<RegionSpecialCase> specialCases : regionalEndpoints.getRegionSpecialCases().values()) {
            for (RegionSpecialCase specialCase : specialCases) {
                events.addAll(validateEndpointPatterns(
                        serviceShape,
                        regionalEndpoints,
                        specialCase.getEndpoint()));
            }
        }

        for (List<PartitionSpecialCase> specialCases : regionalEndpoints.getPartitionSpecialCases().values()) {
            for (PartitionSpecialCase specialCase : specialCases) {
                events.addAll(validateEndpointPatterns(
                        serviceShape,
                        regionalEndpoints,
                        specialCase.getEndpoint()));
            }
        }

        return events;
    }
Validate special case endpoints from endpoint traits that are applied on a service.
smithy-aws-endpoints/src/main/java/software/amazon/smithy/rulesengine/aws/validators/AwsSpecialCaseEndpointValidator.java