Module Spindle_mcp.Template

The variables of a template, each read from the text the URI holds by its own description, as a query parameter is (Wiretype.of_text).

Spindle_mcp.Template.(
  let+ id = required "id" Wiretype.string
  and+ from = optional "from" (Wiretype.int_bounded ~min:1 ()) in
  (id, from))
type 'a t
val required : string -> 'a Wiretype.t -> 'a t

A variable every URI holds: a path's {name}, or a query's that is never left out.

val optional : string -> 'a Wiretype.t -> 'a option t

A query's variable a URI may leave out.

val (let+) : 'a t -> ('a -> 'b) -> 'b t
val (and+) : 'a t -> 'b t -> ('a * 'b) t