Package-level declarations
Types
An access attribute of an aggregate (@Access): its name (AccessAttributeName), unique within the aggregate ignoring case, the type of its values, and whether it holds several of them (multiple) or one, which may be absent.
The rule of an access attribute's name (@Access): lower camel case, a lower-case letter then letters and digits (PATTERN, [a-z][A-Za-z0-9]*), at most MAX_LENGTH characters, such as department or sharedWith, and not one of the built-in attributes' names (BUILT_IN).
An aggregate of a context. Its commands are those it decides, those mounted under its routes, and its system commands: the lifecycle commands its model handles and the rebuild of its snapshots, named by their full names in the system namespace (wow.lifecycle.DeleteAggregate, wow.snapshot.RebuildSnapshot). Those are the same types for every aggregate, so they are not names within the aggregate and never conflict between aggregates; the body of each is the schema of Manifest.defs keyed by that full name (Manifest.schemaRef of it), so a client types it like a command's. queries are the read models of the aggregate a client queries (QueryManifest).
The one reader of the peer contracts on a class path: every PeerContracts.RESOURCE, one per api jar (or directory) that carries the contracts of its contexts, each parsed by the caller's JSON library into the plain tree ManifestTree.read reads, so this module stays free of one. The same contract found twice is read once. A node's contract directory and wow-client's command names both read through it.
The commands of manifests by their schemas, the one rule that names a command class: the command of the schema #/$defs/<binary name> in whichever context decides it is <context>.<aggregate>.<Command>; and their routes by their full type names, the only routes a client sends a command to (routeOf). A mounted command is only an edge's, which no one sends, and is left out. A system command (SystemCommands) is named by its system name on its target (systemCommandTypeOf): an aggregate's lifecycle commands and snapshot rebuild, and a context's schedule job commands, whose target is the context's job aggregate (<context>.schedule). On a conflict the first Manifest's wins. A node's contract directory and wow-client both name commands through it.
A command the aggregate decides, or one mounted under its routes.
The wire names of the commands a subscription refers to (SubscriptionManifest.derives, SubscriptionManifest.calls, SubscriptionManifest.rejected, SubscriptionManifest.committed, SubscriptionManifest.schedules) and an aggregate schedules (AggregateManifest.schedules), as some Manifests decide them. A module that does not decide a command refers to it by its class (#/$defs/<binary name>, Manifest.schemaRef); such a reference names, on the wire:
The REST routes of a command, and the names they reserve.
A bounded context. errors optionally documents the domain's rejection codes, the @ErrorCode constants of its module; they are runtime strings, so the list is neither complete nor checked against what the code rejects with, and a wow.* code is not the context's.
The rule of a bounded context's name: lower-case letters, digits and hyphens, starting with a letter (PATTERN, [a-z][a-z0-9-]*), such as shop or eshop-catalog. A dot is never part of one: it separates the context from the aggregate and the type in every name built from it (context.aggregate.Command, the topics wow.<context>.<aggregate>.state, the host's wow.aggregates.[<context>.<aggregate>] keys), which a dotted context name would make ambiguous.
Whether the classes a peer contract lists are where its consumer runs, context by context: a consumer may hold a context's contract with none of its classes and address it by JSON; it may not hold it with only some of them. A context's commands and events all live in its api module, so some of them present and others not is a contract and types of different versions (a Maven build resolving the two apart), which would fail later, at decoding. The build's merge and the node's startup check every contract on their class path (problems), each finding a class its own way: the merge in its class path's entries, the node in its class loader (locator).
The contracts of a service and its peers do not hold together; problems lists each problem.
An error code a client may receive: its code, the HTTP status it is answered with, what it means, and what a retry may do (retry), after retryAfter seconds, the Retry-After of its problem: one when a retry may get past it, none otherwise. The code is the code of a CommandResult and of a problem+json body, whose type is urn:wow:error:<code> and whose retry member is retry's.
An event of the aggregate: its name in the log, its revision and former names, and its description, as for a CommandManifest.
The HTTP status, description and retry of each of the framework's error codes (FrameworkCodes): the one table the Manifest's top-level errors (Manifest.errors) and the edge's problem+json answers both read.
The function a subscription runs, as CommandResult.function names it: one a context declares, of one of KINDS, never a built-in subscription's.
The contract of a service: its bounded contexts, their aggregates with the commands and events they speak, and their subscriptions, with the JSON Schema 2020-12 of every payload in defs (written $defs).
The one assembly of a service's Manifest from its modules' fragments, the build's (mergeManifest) and the node's at startup alike, so the Manifest a service serves is the one its build wrote: the fragments merged (ManifestMerger), naming the service, then a subscription of another context's events by type given the aggregates the peer contracts list them under (PeerSources), then each command a subscription refers to by its class named by its wire name, as the service's contexts and the peer contracts decide it (CommandReferences).
The fragments of a service contradict each other; conflicts lists every contradiction found.
The markers of requires this reader understands: a marker names a change in what part of a Manifest means, which a reader that does not know it would misread, so ManifestTree.read refuses a Manifest that requires one outside KNOWN, wherever it stands: on the Manifest (Manifest.requires), on a context (ContextManifest.requires) or on an aggregate (AggregateManifest.requires). A value that only widens a set, such as a new enum value, needs no marker: readers read it leniently. Format 1 has none yet. One set serves every level.
A fragment and where it was read from, for the messages of ManifestMerger.
Assembles a service's Manifest from its modules' fragments. The build merges them into the service's manifest.json; the runtime merges the same fragments when it starts. Both refuse a conflict, so a name the runtime resolves is never ambiguous:
The JSON Schema 2020-12 of the Manifest format (Manifest.FORMAT): every object ManifestTree writes, with its keys, which of them it always writes (required: a reader may rely on them; ManifestTree.read also takes a Manifest that leaves out an empty list), and the values of each enumeration this version writes. Its objects are open, as a reader of a newer writer's Manifest reads the keys it does not know past, and an enumeration's values are those of this writer: a reader reads one it does not know leniently (ManifestTree.read).
The JSON shape of a Manifest, as a tree of plain values: a JSON object is a Map<String, Any?> (insertion ordered when written), an array a List<Any?>, and a scalar a String, Number, Boolean or null. Any JSON library writes and reads such a tree, so the Manifest's field names are defined here once and wow-manifest needs none.
The peer contracts of a context: what another service needs to know of a context to send it commands, read its published streams and follow a wait chain through it, carried by the jar of the context's api module, so a service that depends on that api knows the context with no configuration.
The aggregates a subscription of another context's events reads when its handler takes them by type without naming their aggregate (SubscriptionSource.eventSchemas): those whose events the peer contracts list under the schemas the handler takes, all of one context, each read once: several events of one aggregate (the subtypes of a sealed event type) read that aggregate. Each schema names an event of exactly one aggregate; an event two aggregates list, one no contract lists, or events of several contexts are a problem, which names the candidates. A schema only those references held leaves the Manifest with them: an event's schema is its own context's to publish.
A stream of state events a context publishes for other contexts: those of its aggregate, on the Kafka topic (defaultTopic unless overridden), each with the aggregate's state after the commit unless includeState is false, for an aggregate whose state is too large (a subscriber of such a stream declares a nullable state).
The names of the query field constants of an aggregate's state: the compiler's <State>Properties in the domain module and the <Context>Contract generated into its api module from the state schema name each path of the state alike, so the two sets are the same.
A query model of an aggregate: model is QueryRoutes.SNAPSHOT, the aggregate's snapshots, when it keeps them, or QueryRoutes.EVENTS, its event streams; routes are the model's query route and the route of its capability descriptor (QueryRoutes). What a model can do (its operations, fields, limits) is not here: it depends on the query backend the service runs on, which the build does not know, and the descriptor route answers it.
The routes of an aggregate's query models.
A subscription handler's in-process retry budget as @Retry declares it: each setting null when it is not given. Durations are ISO-8601 (PT2S). recoverable, unrecoverable and systemic are the qualified names of the exception classes the handler classifies itself (@Retry(recoverable, unrecoverable, systemic)).
A parameter of a ServiceRouteManifest: a variable of its path or a query parameter (location), its schema an inline JSON Schema of a scalar ({"type":"string"}, an enum), and whether a call must give it (required; a path variable always is).
Whether a read can mask the @Sensitive values of a Manifest schema ($defs): decided here once, for the build (manifest-tools refuses at generation what no read can mask, naming the payload and the path) and for the reader (wow-query's ManifestSchemaReader, which refuses the same schema with the same reason), so the two cannot drift.
The service a build names, as the service module's jar carries it at RESOURCE: the name of the merged Manifest (wow { service }, else the name the contracts of its contexts give, else its project's) and the contexts it serves. The Gradle plugin's service role writes it with the Manifest (mergeWowManifest); the node refuses to start under another name for those contexts. A build without the plugin writes none, and nothing is compared.
The service a merged Manifest describes; a fragment has none, and a peer contract names the service that hosts its contexts, by its name alone, when its module declares it.
A service route of a context (@ServiceRoute): a route whose handler is the service's own code. Its name is its identity within the context, for compatibility and for its generated client; route is where the edge serves it, below the context; parameters are its path variables and query parameters; request and response are the inline JSON Schemas of its body and its answer, null when it takes none or answers 204 No Content: a reference into $defs ({"$ref": "#/$defs/<key>"}), or an array of one ({"type": "array", "items": {"$ref": ...}}, "uniqueItems": true for a set), a nullable one, the body or an item, written with a null alternative (Manifest.nullableSchema). A null answer is 204 No Content, no body, so an answer's schema is never nullable itself: responseOptional says the route may answer 204 No Content instead of its response (its function returns a nullable value), where a route of no response always answers it (its function returns Unit). errors are the codes it refuses with, entries of the context's error table.
Whether the aggregate keeps snapshots (enabled), and the revision of its state's structure the snapshots are written at (stateRevision): raised, the service rebuilds the stored snapshots in place. It keeps no breaking change of the state compatible: every aggregate's state has readers besides the service, the clients of its state read at least, who read it as its schema says.
The aggregate's state: its schema, and the fingerprint a snapshot written under it carries; the fingerprint is null until the schemas are generated. The <State>View a JVM api module generates of it is not part of the Manifest, which every language reads: its contract jar lists the views beside the contract (PeerContracts.STATE_VIEWS_RESOURCE).
The kind of a subscription a context declares: a projection, a reactor or a saga.
A subscription: one handler of a processor, named processor.function.
What a subscription reads: the aggregates (by name) of context whose state events it receives, and the event names it is limited to. Empty aggregates or events mean no limit; a null context means the handler's state type is not an aggregate of the module that declares it.
Where a new subscription, one without a checkpoint, starts reading the log or the stream.
The framework's system commands as a Manifest lists them, with their routes (CommandRoutes): each named by its full system name, its body the schema of Manifest.defs keyed by that name.
Properties
The schema keyword naming the JVM class a value is written from, by its binary name: an api module's generator reads it from the contract to reference the class or copy its structure into a state view. It is the service's internals, so the public port's documents leave it out (withoutClassNames); the contract and the internal port keep it. The keys of $defs stay in every document: they are the types' binary names, which the references use.
Functions
This Manifest without CLASS_KEYWORD in any schema of its $defs: what the public port serves.