Repository navigation
v1.26.0
- Fix: a route method with an
APIRequestas its only positional parameter
was always registered as a raw handler, invoked with theAPIRequestonly.
Its optional and named parameters were never passed: optional ones were
silentlynull(or their default value), with no error or warning, and a
required named parameter failed every call (NoSuchMethodError).- A raw handler is now only a method whose sole parameter is the
APIRequest(seeMethodReflectionExtension.isRawAPIRequestHandler). - A method with an
APIRequestplus optional or named parameters is routed
like any other API method: its parameters are resolved from the request
(parameters, JSON payload, path parts), with theAPIRequestinjected.
The injectedAPIRequestdoesn't consume a path part. - Raw handlers without other parameters work as before.
- Workarounds (such as an extra unused
APICredentialpositional
parameter) are no longer needed, and still work. - Behavior change: the optional/named parameters of such methods are
now set from client-controlled request values. Before, the router always
left them at their defaults. Review any such parameter that was meant to
be set only by server-side callers.
- A raw handler is now only a method whose sole parameter is the
- Reflected routes: a JSON payload is only treated as a parameters map by the
method's non-injected parameter names (a payload key matching an
APIRequest,APICredentialorAPIAuthenticationparameter name is no
longer counted as a parameter key).
PR: #188