private void serializeDocumentation(String documentation) {
            // The documentation trait has a special syntax, which we always want to use.
            codeWriter
                    .pushState()
                    // See https://github.com/smithy-lang/smithy/issues/2115
                    .trimTrailingSpaces(false)
                    .setNewlinePrefix("/// ")
                    .write(documentation.replace("$", "$$"))
                    .popState();
        }
Serializes shapes in the IDL format.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java