Speakeasy Logo
Skip to Content

Java Configuration Options

This section details the available configuration options for the Java SDK. All configuration is managed in the gen.yaml file under the java section.

Version and general configuration

Name
version
Required
true
Default Value
0.0.1
Description
The current version of the SDK.
projectName
Required
true
Default Value
openapi
Description
Assigns Gradle
, which names the Gradle build. See Gradle Naming .

Publishing

Name
groupID
Required
true
Default Value
org.openapis
Description
The group ID used for namespacing the package. Typically the reversed domain of an organization.
artifactID
Required
true
Default Value
openapi
Description
The artifact ID used for namespacing the package, usually the name of the project.
githubURL
Required
for publishing
Default Value
github.com/owner/repo
Description
The GitHub URL where the artifact is hosted. Sets metadata required by Maven.
companyName
Required
for publishing
Default Value
My Company
Description
The name of your company. Sets metadata required by Maven.
companyURL
Required
for publishing
Default Value
Description
Your company's homepage URL. Sets metadata required by Maven.
companyEmail
Required
for publishing
Default Value
Description
A support email address for your company. Sets metadata required by Maven.

Base package name

This package will be where the primary SDK class is located (and sub-packages will hold various types of associated generated classes):

Additional Dependencies

Name
additionalDependencies
Required
false
Default Value
[]
Description
Adds additional dependencies to include in
. Format:
.
additionalPlugins
Required
false
Default Value
[]
Description
Adds additional plugins to include in
. Format:
.

License

Name
license
Required
false
Default Value
MIT License
Description
License information. Defaults to the MIT license if not provided.

Method and parameter management

Name
maxMethodParams
Required
false
Default Value
4
Description
Maximum number of parameters before an input object is created.
means input objects are always used.

Security configuration

Property
flattenGlobalSecurity
Description
Enables inline security credentials during SDK instantiation. Recommended:
Type
boolean
Default
true

Module management

Name
useIndexModules
Required
false
Default Value
true
Description
Determines if index modules are generated.
moduleFormat
Required
false
Default Value
commonjs
Description
Sets the module format to use when compiling the SDK (
,
, or
).

Import management

Field
paths
Required
false
Default Value
{}
Description
Customizes where different parts of the SDK (e.g., callbacks, errors, and operations) will be imported from.

Import paths

Component
callbacks
Default Value
models/callbacks
Description
The directory where callback models will be imported from.
errors
Default Value
models/errors
Description
The directory where error models will be imported from.
operations
Default Value
models/operations
Description
The directory where operation models (i.e., API endpoints) will be imported from.
shared
Default Value
models/components
Description
The directory for shared components, such as reusable schemas and data models, imported from the OpenAPI spec.
webhooks
Default Value
models/webhooks
Description
The directory for webhook models, if your SDK includes support for webhooks.

Error and response handling

Name
clientServerStatusCodesAsErrors
Required
false
Default Value
true
Description
Whether to treat 4xx and 5xx status codes as errors. Options:
or
.

Last updated on