Java Configuration
You can customize the behavior of the Java SDK generator in generators.yml:
SDK Configuration Options
base-api-exception-class-name
base-exception-class-name
client-class-name
The provided string will be used as the client class name.
custom-dependencies
Example:
disable-required-property-builder-checks
enable-forward-compatible-enums
enable-inline-types
enable-public-constructors
When enabled, generates public constructors for model types.
generate-unknown-as-json-node
inline-file-properties
inline-path-parameters
json-include
package-layout
package-prefix
By default, the generated SDK will use the package prefix com.{orgName}.api, where {orgName} is your Fern organization name (defined in fern.config.json).
To override this, you can specify the package-prefix field in your generators.yml configuration.
publish-to
wrapped-aliases
When enabled, generates wrapper types for each alias to increase type-safety.
For example, if you have an alias ResourceId: string then if this is true, the
generator will generate a ResourceId.java file. If false, it will just treat it
as java.util.String.
Publishing metadata configuration options
If you want to customize how your publishing metadata looks in your
build.gradle file, update the metadata field in generators.yml.