def typed.of

ezmcp@0.1.0.0 · src/openapi.bend:459

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

459def typed.of(
460  ps: List<&2, Mem()>,
461  typ: Maybe<&2, Value.Json>,
462  nullable: Bool
463) -> List<&2, Mem()>:
464  match typ:
465    case None{}:
466      ps
467    case Some{+got}:
468      put(ps, "type", typed.null(nullable, got))

Uses (7)

Used by (1)