OapiCodemode.Proxy.Matcher (oapi_codemode v0.2.1)

Copy Markdown View Source

Matches an intercepted (method, path) against the operation index. On failure, suggests the nearest operations so the model can self-correct without another search round-trip.

Summary

Functions

match(operations, method, path)

@spec match([OapiCodemode.Operation.t()], String.t(), String.t()) ::
  {:ok, OapiCodemode.Operation.t(), %{required(String.t()) => String.t()}}
  | {:error, {:no_match, [String.t()]}}