WowExtension
The wow { } block of a module that applies me.ahoo.wow, or me.ahoo.wow.service, which builds its own sources as a domain module does: its models and contract.
wow {
context = "shop"
contractPackage = "com.example.shop.api"
service = "shop-service"
schemaOverrides.put("sample.Money", """{"type":"string"}""")
}It also names the contract of an api module, for a module that uses the code generated from it: implementation(wow.contract(project(":ordering-api"))) (contract).
Inheritors
Properties
The package of the code the api module generates for the module's contexts, <Context>Contract (and a view of a state whose aggregate's classes share no package): the package other services import it from, so it is set once and then kept, whatever aggregates the module gains. Required once the module has a context: generateWowContract fails without it, naming the line to add. A Java package name; a segment that is a Kotlin keyword is quoted in the generated code.
JSON Schemas (2020-12, as JSON text) that replace the introspected schema of a class, by its JVM binary name, or of a property, by the binary name of the class that declares the accessor Jackson writes it by, # and the property's declared name (sample.Order#id). Introspection follows Jackson's annotations, naming and Kotlin module, but cannot see inside a custom serializer: a class or a property written by one declares its schema here, and the build stops for one until it does, printing the line to add.
The service that hosts the module's contexts, as it names itself (spring.application.name): the module's contract names it, so a peer that depends on the api module finds the service by this name, and the service refuses to start under another. The service module merging the contexts takes its name from the contracts (its own included), which must agree; unset everywhere, the contract names no service, a peer reaches it at wow.peers.<context>.url alone, and the service is named after the project path of its module.
Functions
The contract of the api module dependency names: project(":ordering-api"), its coordinates "group:name[:version]", or an external module dependency without artifacts of its own. It is the module with its feature contract (capability <group>:<name>-contract) required: META-INF/wow/contract.json and the code generated from it, <Context>Contract and <State>View, with the api's types. A module that uses that code declares it, implementation(wow.contract(project(":ordering-api"))); a service sees every api's contract without it, and a domain's tests those of the build's api modules. A version catalog's accessor takes the other form (contract of a provider).
The contract of the api module a version catalog names, implementation(wow.contract(libs.ordering.api)), as contract of the dependency: a provider, as implementation(...) takes one.