@Override
        public String toString() {
            String contents = StringUtils.stripStart(super.toString(), null);
            if (imports.isEmpty()) {
                return contents;
            }
            String importString = imports.stream()
                    .sorted()
                    .map(shapeId -> String.format("use %s", shapeId.toString()))
                    .collect(Collectors.joining("\n"));
            return importString + "\n\n" + contents;
        }
Formatter that quotes (and escapes) a string unless it's a valid object key string.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/SmithyIdlModelSerializer.java