def body.arg
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
1235# a request's body: the `requestBody` argument, when the operation has a
1236# body and the argument is there and not null, as JSON for
1237# application/json, else a string as itself and anything else as its JSON
1238def body.arg(none: Bool, +mt: String, +args: Value.Json) -> Maybe<&2, String>:
1239 match none:
1240 case True{}:
1241 None{}
1242 case False{}:
1243 body.of(mt, arg(args, "requestBody"))