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 theextraDependenciessetting.extraDependencies- Any extra python dependencies that should be added to therequirements.txtfile for the sphinx project. These can be particularly useful for customthemes.extraExtensions- Any extra sphinx extensions that should be added to theconf.pyfile 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theautoBuildrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextraDependenciesrecord component.Returns the value of theextraExtensionsrecord component.format()Returns the value of theformatrecord component.fromNode(ObjectNode node) Load the settings from anObjectNode.final inthashCode()Returns a hash code value for this object.theme()Returns the value of thethemerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SphinxSettings
public SphinxSettings(String format, String theme, List<String> extraDependencies, List<String> extraExtensions, boolean autoBuild) Creates an instance of aSphinxSettingsrecord class.- Parameters:
format- the value for theformatrecord componenttheme- the value for thethemerecord componentextraDependencies- the value for theextraDependenciesrecord componentextraExtensions- the value for theextraExtensionsrecord componentautoBuild- the value for theautoBuildrecord component
-
-
Method Details
-
fromNode
Load the settings from anObjectNode.- Parameters:
node- theObjectNodeto load settings from.- Returns:
- loaded settings based on the given node.
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
theme
Returns the value of thethemerecord component.- Returns:
- the value of the
themerecord component
-
extraDependencies
Returns the value of theextraDependenciesrecord component.- Returns:
- the value of the
extraDependenciesrecord component
-
extraExtensions
Returns the value of theextraExtensionsrecord component.- Returns:
- the value of the
extraExtensionsrecord component
-
autoBuild
public boolean autoBuild()Returns the value of theautoBuildrecord component.- Returns:
- the value of the
autoBuildrecord component
-