@Override
    public List<ValidationEvent> validate(Model model) {
        OperationIndex index = OperationIndex.of(model);
        List<ValidationEvent> events = new ArrayList<>();
        for (OperationShape operation : model.getOperationShapes()) {
            TopicCollection topics = createTopics(operation);
            if (topics != null) {
                events.addAll(validateMqtt(index, topics));
            }
        }

        return events;
    }
Validates that labels are correct for MQTT topics on
{@code subscribe} and {@code publish} operations.

<ul>
    <li>Operation input is required when a topic has labels.</li>
    <li>Topic labels must be found in the input.</li>
    <li>The input must not contain extraneous labels.</li>
</ul>
smithy-mqtt-traits/src/main/java/software/amazon/smithy/mqtt/traits/validators/MqttTopicLabelValidator.java