def input.of

ezmcp@0.1.0.0 · src/openapi.bend:956

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

956# the input schema built: an object schema of the properties, with the
957# required names when there are any
958def input.of(st: In) -> Value.Json:
959  match st:
960    case In{props, req}:
961      object(List.append(&2, Mem(), [("type", Json.str("object")),
962        ("properties", object(props))], required(req)))

Uses (9)

Used by (1)