Module Codec.InvokeSource

Build an invoke codec member-by-member, like Json.Codec.Object.

Sourcetype ('o, 'dec) map

A partially-built invoke codec for 'o, constructed by 'dec.

Sourceval map : string -> 'dec -> ('o, 'dec) map

map name dec starts an invoke for tool name assembled by dec.

Sourceval param : enc:('o -> 'a) -> ?description:string -> string -> 'a value -> ('o, 'a -> 'b) map -> ('o, 'b) map

param ~enc ?description name v m adds required parameter name of type v to the invoke under construction m. enc projects the value from 'o when encoding, and description documents the parameter in the derived schema.

Sourceval seal : ('o, 'o) map -> 'o t

seal m finalises the invoke codec.