JustworksExtension

abstract class JustworksExtension @Inject constructor(objects: ObjectFactory)(source)

DSL extension for configuring the Justworks OpenAPI code generator.

Supports multiple named specs, each with independent configuration.

Usage in build.gradle.kts:

justworks {
specs {
register("petstore") {
specFile = file("api/petstore.yaml")
packageName = "com.example.petstore"
}
register("payments") {
specFile = file("api/payments.yaml")
packageName = "com.example.payments"
}
}
}

Each registered spec generates to an isolated output directory and has its own generation task: justworksGenerate<Name>.

Constructors

Link copied to clipboard
@Inject
constructor(objects: ObjectFactory)

Properties

Link copied to clipboard
val specs: NamedDomainObjectContainer<JustworksSpecConfiguration>

Container of named OpenAPI spec configurations.