Packages

A wrapper library for the docker api

Current section

Files

Jump to
pier lib openapi path.ex
Raw

lib/openapi/path.ex

defmodule Pier.OpenApi.Params do
def replace_path_params(path, nil, _) do
path
end
def replace_path_params(path, path_params, params) do
Enum.reduce(path_params, path, &String.replace(&2, "{#{&1["name"]}}", params[&1["name"]]))
end
end