Open v0111d opened 5 years ago
I have come across a similar problem. The solution I found was to add a namespace to the schema: <Schema Namespace="MyNamespace">
. The client library will automatically read this from the metadata. The actual URL for the action will be MyNamespace.Status
.
@vidarkongsli : thank you
I have problem call function or action with parameters.
Server side is ASP.NET Core 2.2 OData 4 API.
Schema:
Function
When I try call this function from SwaggerUI function is available on uri
https://localhost:8089/odata/v3/Users/NewUsers(Since=2019-03-05)?%24count=false
curl -X GET "https://localhost:8089/odata/v3/Users/NewUsers(Since=2019-03-05)?%24count=false" -H "accept: application/json
"Simple.odata.client call function on uri
https://localhost:8089/odata/v3/Users/Default.NewUsers(since=2019-03-05T18%3A48%3A06.8161531%2B01%3A00)
Response is HTTP 404.
Similar issue for action.
Action
When I try call this function from SwaggerUI function is available on uri
https://localhost:44307/odata/v3/Users(1)/Status
curl -X POST "https://localhost:44307/odata/v3/Users(1)/Status" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"status\": \"string\"}"
Simple.odata.client call function on uri
https://localhost:8089/odata/v3/Users/Default.Status
Payload
{"status":"new status"}
Response is HTTP 404.