Class DocSymbolProvider

java.lang.Object
software.amazon.smithy.model.shapes.ShapeVisitor.Default<Symbol>
software.amazon.smithy.docgen.DocSymbolProvider
All Implemented Interfaces:
SymbolProvider, ShapeVisitor<Symbol>

public final class DocSymbolProvider extends ShapeVisitor.Default<Symbol> implements SymbolProvider
Creates documentation Symbols for each shape in the model.

These symbols contain many important pieces of metadata. Particularly important are:

  • name: The name of the symbol will be used as the title for its definition section. For services, this defaults to the value of the title trait. For other shapes, it defaults to the shape name including any renames from the attached service.
  • definitionFile: The file in which the documentation for this shape should be written. By default these are all written to a single flat directory. If this is empty, the shape does not have its own definition section and cannot be linked to.
  • SHAPE_PROPERTY: A named Shape property containing the shape that the symbol represents. Decorators provided by SmithyIntegration.decorateSymbolProvider(software.amazon.smithy.model.Model, S, software.amazon.smithy.codegen.core.SymbolProvider) MUST set or preserve this property.
  • OPERATION_PROPERTY: A named OperationShape property containing the operation shape that the shape is bound to. This will only be present on structure shapes that have the input or output traits.
  • LINK_ID_PROPERTY: A named String property containing the string to use for the id for links to the shape. In HTML, this would be the id for the tag containing the shape's definition. Given a link id foo, a link to the shape's definition might look like https://example.com/shapes#foo for example. If this or definitionFile is empty, it is not possible to link to the shape.
  • ENABLE_DEFAULT_FILE_EXTENSION: A named boolean property indicating whether the symbol's definition file should have the default file extension applied. If not present or set to false, the file extension will not be applied.

Decorators provided by SmithyIntegration.decorateSymbolProvider(software.amazon.smithy.model.Model, S, software.amazon.smithy.codegen.core.SymbolProvider) MUST set these properties or preserve