def described

ezmcp@0.1.0.0 · src/openapi.bend:818

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

818# a schema with its description set to `desc`, in its place or last, when
819# it is an object and there is one to set
820def described(+val: Value.Json, desc: Maybe<&2, String>) -> Value.Json:
821  match desc:
822    case None{}:
823      val
824    case Some{got}:
825      described.at(Json.is_obj(val), val, got)

Uses (5)

Used by (2)