Question

I run:

JaySvcUtil.exe --metadataUri http://localhost:1578/Service.svc/$metadata --out Model.js -- namespace Model --v V2

the output is:

Requesting: http://localhost:1578/Service.svc/$metadata... done.
OData version: V2

And the result file:

(function(global, $data, undefined) {

})(window, $data);
Was it helpful?

Solution

There are several edm-namespaces for various OData versions. I'd first try to avoid the --v switch and let JaySvcUtil.exe trying to determine the correct one.

If that doesn't work check the supported version of name-spaces at https://github.com/jaydata/JaySvcUtil/blob/master/Program.cs

public static Dictionary<string, string> NamespaceVersions  = new Dictionary<string,string>
  {
    {"http://schemas.microsoft.com/ado/2007/05/edm", "V11" },
    {"http://schemas.microsoft.com/ado/2006/04/edm", "V1" },
    {"http://schemas.microsoft.com/ado/2008/09/edm", "V2" },
    {"http://schemas.microsoft.com/ado/2009/08/edm", "V21" },
    {"http://schemas.microsoft.com/ado/2009/11/edm", "V3" }
  };

If the one that is produced by localhost:1578/Service.svc/$metadata is not in there add an request at https://github.com/jaydata/JaySvcUtil/issues

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top