def bad

ezmcp@0.1.0.0 · src/openapi.bend:1475

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

1475# what is wrong with the first property whose argument is there and does
1476# not fit its schema (`fits`)
1477def bad(ps: List<&2, Mem()>, +args: Value.Json) -> Maybe<&2, String>:
1478  match ps:
1479    case []:
1480      None{}
1481    case (+name, +sch) <> rest:
1482      bad.at(Bool.or(Bool.not(Json.has(args, name)), fits(sch, Json.get(args,
1483        name))), name, sch, Json.get(args, name), _u => bad(rest, args))

Uses (12)

Used by (1)