private List<ValidationEvent> validatePartitionalEndpointPatterns(
            ServiceShape serviceShape,
            StandardPartitionalEndpointsTrait partitionalEndpoints
    ) {

        List<ValidationEvent> events = new ArrayList<>();

        for (List<PartitionEndpointSpecialCase> specialCases : partitionalEndpoints.getPartitionEndpointSpecialCases()
                .values()) {
            for (PartitionEndpointSpecialCase specialCase : specialCases) {
                events.addAll(validateEndpointPatterns(
                        serviceShape,
                        partitionalEndpoints,
                        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