Record Class SphinxIntegration.SphinxSettings

java.lang.Object
java.lang.Record
software.amazon.smithy.docgen.integrations.SphinxIntegration.SphinxSettings
Record Components:
format - The sphinx output format that will be built automatically during generation. The default is html. See sphinx docs for other output format options.
theme - The sphinx html theme to use. The default is alabaster. If your chosen theme requires a python dependency to be added, use the extraDependencies setting.
extraDependencies - Any extra python dependencies that should be added to the requirements.txt file for the sphinx project. These can be particularly useful for custom themes.
extraExtensions - Any extra sphinx extensions that should be added to the conf.py file for the sphinx project.
autoBuild - Whether to automatically attempt to build the generated sphinx project. The default is true. This will attempt to discover Python 3 on the path, create a virtual environment inside the output directory, install all the dependencies into that virtual environment, and finally run sphinx-build.
Enclosing class:
SphinxIntegration

public static record SphinxIntegration.SphinxSettings(String format, String theme, List<String> extraDependencies, List<String> extraExtensions, boolean autoBuild) extends Record
Settings for sphinx projects, regardless of their intermediate format.

These settings can be set in the smithy-build.json file under the sphinx key of the doc generation plugin's integrations config. The following example shows a smithy-build.json configuration that sets the default sphinx output format to be dirhtml instead of html.


 {
     "version": "1.0",
     "projections": {
         "sphinx-markdown": {
             "plugins": {
                 "docgen": {
                     "service": "com.example#DocumentedService",
                     "format": "sphinx-markdown",
                     "integrations": {
                         "sphinx": {
                             "format": "dirhtml"
                         }
                     }
                 }
             }
         }
     }
 }
 
  • Constructor Details

    • SphinxSettings

      public SphinxSettings(String format, String theme, List<String> extraDependencies, List<String> extraExtensions, boolean autoBuild)
      Creates an instance of a SphinxSettings record class.
      Parameters:
      format - the value for the format record component
      theme - the value for the theme record component
      extraDependencies - the value for the extraDependencies record component
      extraExtensions - the value for the extraExtensions record component
      autoBuild - the value for the autoBuild record component
  • Method Details

    • fromNode

      public static SphinxIntegration.SphinxSettings fromNode(ObjectNode node)
      Load the settings from an ObjectNode.
      Parameters:
      node - the ObjectNode to load settings from.
      Returns:
      loaded settings based on the given node.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • format

      public String format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • theme

      public String theme()
      Returns the value of the theme record component.
      Returns:
      the value of the theme record component
    • extraDependencies

      public List<String> extraDependencies()
      Returns the value of the extraDependencies record component.
      Returns:
      the value of the extraDependencies record component
    • extraExtensions

      public List<String> extraExtensions()
      Returns the value of the extraExtensions record component.
      Returns:
      the value of the extraExtensions record component
    • autoBuild

      public boolean autoBuild()
      Returns the value of the autoBuild record component.
      Returns:
      the value of the autoBuild record component