|
Clients can get a 200 back from a POST that is invoking an RPC that has
all optional parameters but the RPC is actually never called. The code
flow ends up in a @deprecated method (see details below).
The call stack that leads to invoking the RPC go through RestconfCompositeWrapper in the first method below and those that fail to invoke the RPC go through the second method below (which happens to be deprecated)
(line 64)
@Override
public NormalizedNodeContext invokeRpc(final String identifier, final NormalizedNodeContext payload,
final UriInfo uriInfo)
{ return this.restconf.invokeRpc(identifier, payload, uriInfo); }
@Override
@Deprecated
public NormalizedNodeContext invokeRpc(final String identifier, final String noPayload, final UriInfo uriInfo)
{ return this.restconf.invokeRpc(identifier, noPayload, uriInfo); }
Lower on the call stack is the HttpMethodRule which uses a HttpMethodRule.Matcher around
line 100 that uses the request media type in trying to figure out which method to call above.
With CURL, the media type is set to "application/json" on the command line. With swagger,
the media type is coming in as "text/plain" even though the swagger ui shows "application/json". So this is also a bug in swagger right now.
|