private void validateInputOutputSet(
            OperationShape operation,
            StructureShape input,
            StructureShape output,
            List<ValidationEvent> events
    ) {
        if (!input.hasTrait(InputTrait.ID)) {
            events.add(warning(input,
                    String.format(
                            "This structure is the input of `%s`, but it is not marked with the "
                                    + "@input trait. The @input trait gives operations more flexibility to "
                                    + "evolve their top-level input members in ways that would otherwise "
                                    + "be backward incompatible.",
                            operation.getId()),
                    INPUT,
                    operation.getId().getName()));
        }

        if (!output.hasTrait(OutputTrait.ID)) {
            events.add(warning(output,
                    String.format(
                            "This structure is the output of `%s`, but it is not marked with "
                                    + "the @output trait.",
                            operation.getId()),
                    OUTPUT,
                    operation.getId().getName()));
        }
    }
Validates that all operations define input and output structures that are marked
with the input and output traits.
smithy-linters/src/main/java/software/amazon/smithy/linters/InputOutputStructureReuseValidator.java