@Override
    public void accept(Shape shape, MemberListingType listingType) {
        // Legacy enums using the trait on a string shape should be upgraded
        // to `enum` shapes. If not, skip them here.
        if (shape.isStringShape() && shape.hasTrait(EnumTrait.ID)) {
            return;
        }

        var symbol = context.symbolProvider().toSymbol(shape);
        context.writerDelegator().useShapeWriter(shape, writer -> {
            writer.pushState(new ShapeSection(context, shape));
            symbol.getProperty(DocSymbolProvider.LINK_ID_PROPERTY, String.class).ifPresent(writer::writeAnchor);
            writer.openHeading(symbol.getName());

            writer.injectSection(new ShapeSubheadingSection(context, shape));
            writer.writeShapeDocs(shape, context.model());
            writer.injectSection(new ShapeDetailsSection(context, shape));
            GeneratorUtils.writeProtocolsSection(context, writer, shape);

            new MemberGenerator(context, writer, shape, listingType).run();

            writer.closeHeading();
            writer.popState();
        });
    }
Constructs a StructuredShapeGenerator.

@param context The context used to generate documentation.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/generators/StructuredShapeGenerator.java