CAP never authorizes.
Closed, table-driven validation for protocol-owned artifact definitions.
Validation always completes one whole stage before entering the next: unknown member, missing required, type, constraint, cardinality, nested, and cross-field. Field declaration order chooses same-stage subjects; document member order never chooses a verdict.
Summary
Functions
Build a protocol-owned closed-object definition. Invalid definitions fail loudly.
Project one protocol-owned definition to the canonical tagged schema document it implements.
Build one protocol-owned field declaration. Invalid declarations fail loudly.
Validate one tagged object against a protocol-owned definition.
Functions
@spec definition(binary(), [CharterAgreementProtocol.Schema.Field.t()], keyword()) :: CharterAgreementProtocol.Schema.Definition.t()
Build a protocol-owned closed-object definition. Invalid definitions fail loudly.
@spec document(CharterAgreementProtocol.Schema.Definition.t()) :: CharterAgreementProtocol.Json.value()
Project one protocol-owned definition to the canonical tagged schema document it implements.
@spec field( binary(), keyword() ) :: CharterAgreementProtocol.Schema.Field.t()
Build one protocol-owned field declaration. Invalid declarations fail loudly.
@spec validate( CharterAgreementProtocol.Schema.Definition.t(), CharterAgreementProtocol.Json.value() ) :: {:ok, CharterAgreementProtocol.Json.value()} | {:error, CharterAgreementProtocol.Error.t()}
Validate one tagged object against a protocol-owned definition.