Class ServiceGenerator
java.lang.Object
software.amazon.smithy.docgen.generators.ServiceGenerator
- All Implemented Interfaces:
Consumer<GenerateServiceDirective<DocGenerationContext,
DocSettings>>
public final class ServiceGenerator
extends Object
implements Consumer<GenerateServiceDirective<DocGenerationContext,DocSettings>>
Generates top-level documentation for the service.
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 shape's heading, before modeled docs.ShapeDetailsSection
: Enables adding in additional details that are inserted after the service's modeled documentation.BoundOperationsSection
: enables modifying the listing of operations transitively bound to the service, which includes operations bound to resources.BoundOperationSection
: enables modifying the listing of an individual operation transitively bound to the service.BoundResourcesSection
: enables modifying the listing of resources directly bound to the service.BoundResourceSection
: enables modifying the listing of an individual resource directly bound to the service.AuthSection
enables modifying the documentation for the different auth schemes available on the service. This section will not be present if the service has no auth traits.
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 Details
-
ServiceGenerator
public ServiceGenerator()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<GenerateServiceDirective<DocGenerationContext,
DocSettings>>
-