sanger/S2Mapper — pull request #95 by benoitmangili (2013-05-08 19:41:17+00:00)
Title: corrected the behaviour

+ laboratorySearch and supportSearch, when 'sent' to the server, produce a request of the following form:
````
{
"search": {...}
}
````
instead of using their resource type ( i.e. `{ "laboratorySearch":{...}}` )
This looks a bit dirty, as the string 'search' is injected... forcefully:
in s2_base_resource:
````
if (this.resourceType === 'laboratorySearch' || this.resourceType === 'supportSearch') {
d['search'] = data;
} else {
d[this.resourceType] = data;
}
````

+ The resourceType of the resource looked for is injected in the resource processor of the Root. This allows the 'search' resources to be properly processed on the way back

The problem is this convention that the name of the json sent to S2 *is* the name of the resource in the mapper... hence the needed translation...