Class StructuredShapeGenerator

java.lang.Object
software.amazon.smithy.docgen.generators.StructuredShapeGenerator
All Implemented Interfaces:
BiConsumer<Shape,MemberGenerator.MemberListingType>

public final class StructuredShapeGenerator extends Object implements BiConsumer<Shape,MemberGenerator.MemberListingType>
Generates documentation for shapes with members.

The output of this can be customized in a number of ways. To add details to or re-write particular sections, register an interceptor with SmithyIntegration.interceptors(C). The following sections are guaranteed to be present:

  • ShapeSubheadingSection: Enables adding additional details that are inserted right after the shape's heading, before modeled docs.
  • ShapeDetailsSection: Enables adding additional details that are inserted directly after the shape's modeled documentation.
  • ShapeSection: Enables re-writing or overwriting the entire page, including changes made in other sections.
  • ProtocolSection Enables adding traits that are specific to a particular protocol. This section will only be present if there are protocol traits applied to the service. If there are multiple protocol traits, this section will appear once per protocol. This section will also appear for each member.
  • ProtocolsSection Enables modifying the tab group containing all the protocol traits for all the protocols. This section will also appear for each member.
Additionally, if the shape has members the following sections will also be present:
  • MemberSection: enables modifying documentation for an individual shape member.
  • ShapeMembersSection: enables modifying the documentation for all of the shape's members.

To change the intermediate format (e.g. from markdown to restructured text), a new DocFormat needs to be introduced via DocIntegration.docFormats(software.amazon.smithy.docgen.DocSettings).

See Also: