Class ResourceGenerator
java.lang.Object
software.amazon.smithy.docgen.generators.ResourceGenerator
- All Implemented Interfaces:
BiConsumer<DocGenerationContext,ResourceShape>
public final class ResourceGenerator
extends Object
implements BiConsumer<DocGenerationContext,ResourceShape>
Generates documentation for the resources.
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:
ShapeSection: Enables re-writing or overwriting the entire page, including changes made in other sections.ShapeSubheadingSection: Enables adding additional details that are inserted right after the resource's heading, before modeled docs.ShapeDetailsSection: Enables adding in additional details that are inserted after the resource's modeled documentation.ShapeMembersSection: Two versions of this section will appear on the page, one for the resource's identifiers and one for the resource's properties. These enable re-writing or editing those entire sections.MemberSection: enables modifying documentation for an individual resource property or identifier.BoundOperationsSection: enables modifying the listing of operations directly bound to the resource. This does not include any operations transitively bound to the resource through sub-resources or lifecycle operations.BoundOperationSection: enables modifying the listing of an individual operation bound to the resource. This does not include any operations transitively bound to the resource through sub-resources or lifecycle operations. This section will only be present if there are operations directly bound to the resource.LifecycleSection: enables modifying the listing of operations bound as one of the resource's lifecycle operations.LifecycleOperationSection: enables modifying the listing of an individual resource lifecycle operation. This section will only be present if the resource has bound lifecycle operations.BoundResourcesSection: enables modifying the listing of sub-resources directly bound to the resource.BoundResourceSection: enables modifying the listing of an individual sub-resource directly bound to the resource. This section will only be present if the resource has any sub-resources.
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).
To change the filename or title, implement
SmithyIntegration.decorateSymbolProvider(software.amazon.smithy.model.Model, S, software.amazon.smithy.codegen.core.SymbolProvider)
and modify the generated symbol's definition file. See
DocSymbolProvider for details on other
symbol-driven configuration options.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(DocGenerationContext context, ResourceShape resource) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiConsumer
andThen
-
Constructor Details
-
ResourceGenerator
public ResourceGenerator()
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceBiConsumer<DocGenerationContext,ResourceShape>
-