I'm currently "migrating" from SOAP to REST services. (legacy code)
There are several methods that send objects in the request, the objects vary in type and number, I'd like to do something like this.
public long getRelationship(@RequestBody RelationshipDirection relationshipDirection,
@RequestBody List<long> ids, @RequestBody BigInteger skipCount){
/*do something*/
}
And then there is another method that needs just 2 objects, and one is 'Extension' type.
From similar questions I know that I need a wrapper object, but I would need one for each possible combination of parameter number and types, so my question here is:
Is there another solution for this? , something like a "Generic container"?