Openapi.op: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/openapi.bend as Openapi Lines 979-996 of ezmcp@0.1.0.0/src/openapi.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/openapi.bend&start_line=979&end_line=996 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 # one operation of a Path Item at `path`, `oper` its Operation Object, its # references followed in `doc`, after the Path Item's parameters `ips` def op( +doc: Value.Json, +path: String, +method: String, ips: List<&2, Value.Json>, +oper: Value.Json ) -> Op: +ps = params.merge(Json.items(dereferenced(doc, Json.get(oper, "parameters"))), ips) +rb = dereferenced(doc, Json.get(oper, "requestBody")) +mt = media.of(rb, Json.is_obj(rb)) Op{name.of(Json.as_str(Json.get(oper, "operationId")), method, path), describe(Json.as_str(Json.get(oper, "description")), Json.as_str(Json.get(oper, "summary")), method, path), input.of(input.body(rb, mt, input.params(ps, In{[], []}))), String.to_upper(method), path, params.of(ps), mt} Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.to_upper https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=as_str https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=get https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=is_obj https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=items https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=In https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=Op https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=dereferenced https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=describe https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=input.body https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=input.of https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=input.params https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=media.of https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=name.of https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=params.merge https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=params.of