ContractRecord

PackageReified.Schema

Contract

A schema describes the current model. A Contract records previously shipped wire versions and a typed migration from each version into that model.

Contract.parse selects the declared version, parses its frozen shape, and runs the migration. It returns the current model, an unrecognized-version error, or the path-aware parse failures for the selected version.

See Versioned Contracts for the complete authoring workflow.

Fields

NameTypeDescription
createContract.create name currentVersion currentSchemaStarts a contract at its current version and schema.
supersedesContract.supersedes version schema migrate builderAdds the immediately preceding wire version and its typed migration to the next registered version.
buildContract.build source builderFinishes a contract with an explicit version-detection strategy.
parseVersionContract.parseVersion contract version rawParses input using an out-of-band version value.
parseContract.parse contract rawDetects the input version according to the contract and parses it into the current trusted model.
nameContract.name contractReturns the contract's stable name.
currentVersionContract.currentVersion contractReturns the highest supported version.
currentSchemaContract.currentSchema contractReturns the schema for the current domain model.
NameNameNo description available.
CurrentVersionCurrentVersionNo description available.
CurrentSchemaCurrentSchemaNo description available.
SourceSourceNo description available.
VersionsVersionsNo description available.