@Override
    public List<ValidationEvent> validate(Model model) {
        List<ValidationEvent> events = new ArrayList<>();
        for (ServiceShape serviceShape : model.getServiceShapesWithTrait(StandardRegionalEndpointsTrait.class)) {
            events.addAll(validateRegionalEndpointPatterns(serviceShape,
                    serviceShape.expectTrait(StandardRegionalEndpointsTrait.class)));
        }
        for (ServiceShape serviceShape : model.getServiceShapesWithTrait(StandardPartitionalEndpointsTrait.class)) {
            events.addAll(validatePartitionalEndpointPatterns(serviceShape,
                    serviceShape.expectTrait(StandardPartitionalEndpointsTrait.class)));
        }
        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