def call
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
1288# the request a call of an operation stands for, with these arguments:
1289# each parameter with an argument there and not null put in the request
1290# (`req.params`), the header fields Accept: application/json, then the
1291# header parameters', then Content-Type when there is a body (`body.arg`);
1292# or Unfilled when the path still holds a `{`
1293def call(oper: Op, +args: Value.Json) -> Call:
1294 match oper:
1295 case Op{name, description, input, method, path, params, +mt}:
1296 call.of(method, mt, body.arg(String.is_empty(mt), mt, args),
1297 req.params(params, args, Req{path, [], []}))