Allow to specify a custom API root path in the spec when adding resources

Patch to allow to add a "resourcePath" property on spec sent to add method functions. If this property is set, it will override the default behavior, whit is to use the first part of the "path" porperty.

This allows the user to manually group resources in cases where only the path is not enough.