Manifest

class Manifest @InternalWowApi constructor(val format: Int = FORMAT, val service: ServiceInfo? = null, val contexts: List<ContextManifest> = emptyList(), val errors: List<ErrorManifest> = emptyList(), val defs: Map<String, Any?> = emptyMap(), val requires: List<String> = emptyList())

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 same type holds a module's fragment (META-INF/wow/manifest/<module>.json, without service) and a service's merged Manifest (ManifestMerger). It is plain data: ManifestTree turns it into the JSON tree any JSON library writes, and reads it back.

Names inside are relative to their parent: a command named AddItem of aggregate cart in context shop is the command type shop.cart.AddItem. A schema is referred to as #/$defs/<key> (schemaRef).

errors lists the framework's wow.* error codes with their HTTP statuses (FrameworkErrors): a fragment leaves it empty and ManifestMerger writes the table.

A command another part of the Manifest refers to (SubscriptionManifest.derives, SubscriptionManifest.rejected, SubscriptionManifest.committed, SubscriptionManifest.calls) is named by its full type name (shop.cart.RemoveCartItem) when the module that wrote it decides the command; else by the schema reference of its class (#/$defs/<binary name>, schemaRef): defs holds its schema like any other, and the Manifest of the context that decides it (a peer Manifest) names it by the same schema.

requires lists the markers a reader must understand to read this Manifest as it means (ManifestFeatures): a reader that does not know one refuses the Manifest rather than misread it. A value a reader does not know elsewhere is read leniently (ManifestTree.read).

Fields may be added: pass the constructor's arguments by name.

Constructors

Link copied to clipboard
constructor(format: Int = FORMAT, service: ServiceInfo? = null, contexts: List<ContextManifest> = emptyList(), errors: List<ErrorManifest> = emptyList(), defs: Map<String, Any?> = emptyMap(), requires: List<String> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val defs: Map<String, Any?>

The JSON Schemas the schemaRefs point to, by key, as JSON trees (ManifestTree describes the values).

Link copied to clipboard
Link copied to clipboard
val format: Int
Link copied to clipboard

The markers a reader must understand to read this Manifest (ManifestFeatures); none in format 1 so far.

Link copied to clipboard

Every schema reference of the contexts, in declaration order: those of the aggregates (their system commands' included), then the context's own system commands', then the commands the subscriptions refer to by their schemas, then the requests and responses of its service routes.

Link copied to clipboard
Link copied to clipboard

The schema references whose key is not in defs: a fragment before its schemas are generated has them all.

Functions

Link copied to clipboard
fun Manifest.copyWith(format: Int = this.format, service: ServiceInfo? = this.service, contexts: List<ContextManifest> = this.contexts, errors: List<ErrorManifest> = this.errors, defs: Map<String, Any?> = this.defs, requires: List<String> = this.requires): Manifest
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

This Manifest without CLASS_KEYWORD in any schema of its $defs: what the public port serves.