def input.param.of

ezmcp@0.1.0.0 · src/openapi.bend:852

import ezmcp@0.1.0.0/src/openapi.bend as Openapi
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value

852# a parameter as an input property: one with a name and a schema is the
853# property of that name, its schema mapped (`schema`) and described by the
854# parameter's description when that is a non-empty string, and required
855# when the parameter is; any other leaves the input as it is
856def input.param.of(
857  name: Maybe<&2, String>,
858  ok: Bool,
859  +one: Value.Json,
860  st: In
861) -> In:
862  match name ok:
863    case Some{+got} True{}:
864      input.param.put(got, one, st)
865    case _n _ok:
866      st

Uses (6)

Used by (1)