@Override
    public List<ValidationEvent> validate(Model model) {
        List<ValidationEvent> events = new ArrayList<>();

        for (ResourceShape resource : model.getResourceShapesWithTrait(TaggableTrait.class)) {
            TaggableTrait trait = resource.expectTrait(TaggableTrait.class);
            Map<String, ShapeId> properties = resource.getProperties();
            if (trait.getProperty().isPresent() && properties.containsKey(trait.getProperty().get())) {
                Shape propertyShape = model.expectShape(properties.get(trait.getProperty().get()));
                if (!TaggingShapeUtils.verifyTagsShape(model, propertyShape)) {
                    events.add(error(resource,
                            "Tag property must be a list shape targeting a member"
                                    + " containing a pair of strings, or a Map shape targeting a string member."));
                }
            }
        }

        return events;
    }
Validates tagging property used for a taggable resource to encourage consistency.
smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/tagging/TagResourcePropertyTypeValidator.java