-
Improvement
-
Resolution: Done
-
Medium
-
None
We are using this as a base class for Json/XmlNormalizedNodeBodyReader and Xml/JsonPatchBodyReader.
In order to get the requisite information, we must rely on @Context-injected UriInfo and Request – which do not work on client-side anyway – and based on these and InstanceIdentifier's content we make a ton of assumptions about what context the NormalizedNodePayload is being read.
Those assumptions are easily eliminating by the actual users in RestconfDataServiceImpl and RestconfOperationsServiceImpl actually driving the parsing process.
This means that all users relying on NormalizedNodePayload being injected as an argument, like:
public void invokeRpc(@Encoded @PathParam("identifier") final String identifier, final NormalizedNodePayload payload, @Context final UriInfo uriInfo, @Suspended final AsyncResponse ar) { // ... }
need to actually start with creating an InstanceIdentifierContext (from identifier) and pass the proper parameters to the appropriate parser.
For dealing with @Consumes variance, we only have two sets of input types (JSON, XML), so providing specialized methods for the two types.
- blocks
-
NETCONF-1118 Refactor restconf.common.patch
- Confirmed