JustworksSpecConfiguration
Configuration for a single OpenAPI spec in the Justworks multi-spec DSL.
Each spec is independently configured with its own OpenAPI file path, package structure, and generates to an isolated output directory.
Usage in build.gradle.kts:
justworks {
specs {
register("petstore") {
specFile = file("api/petstore.yaml")
packageName = "com.example.petstore"
}
}
}This class implements Named to work with Gradle's org.gradle.api.NamedDomainObjectContainer. The name is injected via constructor and determines the task name and output directory.
Properties
Prefix for generated API client class names. Defaults to "".
Suffix for generated API client class names. Defaults to "Api" (e.g. tag pets ->PetsApi).
Package for generated API client classes. Defaults to "$packageName.api" if not set.
Whether to generate an interface per API tag that the client class implements. Defaults to false. When enabled, the interface keeps the configured name (e.g. PetsApi) and the concrete client gets an Impl suffix (PetsApiImpl).
Whether to emit KDoc comments in generated code. Defaults to true. Set to false to reduce generated file size and noise.
Package for generated model/data classes. Defaults to "$packageName.model" if not set.
Base package name for generated code (e.g., "com.example.api").