jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 94 forks source link

Unbound function calls fail due to incorrect query syntax. #257

Closed jcannata closed 8 years ago

jcannata commented 8 years ago

I have an OData v4 service (WebApi v5.2.3) which exposes both bound and unbound functions. Bound functions are correctly called using the so-called 'inline parameter syntax' (e.g. FuncName(param1 = 42, param2 = 'hello') however unbound functions are called via query parameters resulting in a 404.

I am using jaydata 1.5.5 and the data context is being generated with jaysvcutil 0.1.8.

Example, calling the bound function TopTeams against my Competitions endpoint produces:

GET http://localhost/queryService/odata/Competitions(5)/CAAI.ReadStore.TopTeams(maxCount=3)

Calling the unbound function BirthDateForAge produces:

GET http://localhost/queryService/odata/BirthDateForAge?age=12

Note how the 'age' parameter is sent as a query parameter. This causes my server to 404 as it doesn't fit the expected route of BirthDateForAge(age=12).

Any assistance would be appreciated.

robesz commented 8 years ago

fixed by @lazarv , will be released in 1.5.6 RC, you can build the current version to get early access to the fix. Thank you for all your efforts with the detailed description of the issue.