private Optional<String> descriptionMessage(Shape shape) {
        StringBuilder builder = new StringBuilder();
        shape
                .getTrait(DocumentationTrait.class)
                .ifPresent(trait -> builder.append(trait.getValue()));
        shape
                .getTrait(DeprecatedTrait.class)
                .ifPresent(trait -> builder
                        .append("\n")
                        .append(trait.getDeprecatedDescription(shape.getType())));
        String description = builder.toString().trim();
        return description.isEmpty() ? Optional.empty() : Optional.of(description);
    }
Updates a schema builder using shared logic across shapes.

@param shape Shape being converted.
@param builder Schema being built.
@return Returns the updated schema builder.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/JsonSchemaShapeVisitor.java