Skip to content

covenix / generateContractDocument

Function: generateContractDocument() ​

generateContractDocument(sources, info, options?): object

Defined in: src/contract.ts:284

Assembles a CovenixContract from controller sources (prototype + optional registration basePrefix). All operations share one SchemaConverter, so named schemas are hoisted once into schemas. The result is validated against CovenixContractSchema before return (validate-on-write).

Parameters ​

sources ​

ControllerSource[]

info ​

InfoObject

options? ​

ContractOptions = {}

Returns ​

object

covenixContract ​

covenixContract: "0.1"

info ​

info: object

Index Signature ​

[key: string]: unknown

info.title ​

title: string

info.version ​

version: string

operations ​

operations: object[]

schemas ​

schemas: Record<string, SchemaNode>