I have a requirement where most of WCF REST apis are of type GET and would receive Dictionary as a param. But when it is put as below, it throws error.
[WebGet(UriTemplate = "/GetVersion?Param1={serverDetails}")]
public Version GetVersion(Dictionary<string, string> keyValue)
{
}
It gives below error:
Operation 'GetVersion' in contract 'IDeploy' has a query variable named 'keyValue' of type 'System.Collections.Generic.Dictionary'2[System.String,System.String]', but type 'System.Collections.Generic.Dictionary'2[System.String,System.String]' is not convertible by 'QueryStringConverter'. Variables for UriTemplate query values must have types that can be converted by 'QueryStringConverter'.
Any idea how to resolve this? it would be hard to replace Dictionary param type as there are lots of such methods in service.