This function walks down the path segments and returns the leaf node
if it looks like a MethodValidators (has input or output key).
Returns undefined if the path doesn't exist or lands on a namespace
node (not a leaf with schemas).
Parameters
validators: undefined|Record<string,unknown>
The validators map (same shape as the API), or undefined
methodPath: string
Dotted method path, e.g. "add" or "math.grade1.add"
Look up the
MethodValidatorsfor a dotted method path (e.g. "math.grade1.add") from a validators object that mirrors the API shape.The validators object has the same nesting as the API:
This function walks down the path segments and returns the leaf node if it looks like a
MethodValidators(hasinputoroutputkey). Returnsundefinedif the path doesn't exist or lands on a namespace node (not a leaf with schemas).