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
Types
What matching reads: id, method and segments.
Functions
The ids of the 5 operations whose ids are nearest
op_id by Jaro distance, nearest first.
Types
@type candidate() :: OapiCodemode.Operation.t() | OapiCodemode.SpecStore.OperationSummary.t() | OapiCodemode.Resolve.resolved()
What matching reads: id, method and segments.
A stored %OapiCodemode.Operation{} has them, a resolved operation has
them, and so does the registry's cached index entry — and the index is what
the proxy matches against, the operation itself being read from the store
only once one has been matched.
Functions
The ids of the 5 operations whose ids are nearest
op_id by Jaro distance, nearest first.
search_apis' describe names these when handed an id the index does not
hold: an unknown id is usually a near miss (a typo, a _ for a -, the
wrong casing) the model can fix without another search round trip. Ties
keep index order, so the suggestions are deterministic for a given index.