def params.of
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
import emerging-ezjson@1.2.0.0/main.bend as Json
import emerging-ezjson@1.2.0.0/src/value.bend as Value
795# the parameters a request is built from: each with a non-empty name, and
796# where it goes
797def params.of(ps: List<&2, Value.Json>) -> List<&2, Param>:
798 match ps:
799 case []:
800 []
801 case +one <> rest:
802 List.append(&2, Param, param.of(full(Json.as_str(Json.get(one, "name"))),
803 str.at(one, "in")), params.of(rest))