@Override
    public List<ValidationEvent> validate(Model model) {
        if (!model.isTraitApplied(EndpointTrait.class) && !model.isTraitApplied(HostLabelTrait.class)) {
            return Collections.emptyList();
        }

        // Validate all operation shapes with the `endpoint` trait.
        List<ValidationEvent> events = new ArrayList<>();
        for (OperationShape operation : model.getOperationShapesWithTrait(EndpointTrait.class)) {
            events.addAll(validateStructure(model, operation, operation.expectTrait(EndpointTrait.class)));
        }

        return events;
    }
Match the expanded template to be a valid RFC 3896 host.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/HostLabelTraitValidator.java