We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observed in System.Web.OData 5.9.1 & 6.0.0
I have exposed the the following endpoint:
/entity1('key')/entity2('key')/entity3('key')/entity4('key')
When I execute /entity1('key')/entity2('key')/entity3?$expand=entity4 I receive a JSON response with the correct "@odata.context":
/entity1('key')/entity2('key')/entity3?$expand=entity4
"@odata.context"
"@odata.context": "https://host:port/$metadata#entity1('key')/entity2('ket')/entity3", "value": [ { ..., "entity4@odata.context": "https://host:port/$metadata#entity1('key')/entity2('key')/entity3('key')/entity4", "entity4": [ { ... } ] }, ...
When I execute /entity1('key')/entity2('key')/entity3('key')?$expand=entity4 however, I receive an incorrect "@odata.context" with two keys:
/entity1('key')/entity2('key')/entity3('key')?$expand=entity4
"@odata.context": "https://host:port/$metadata#entity1('key')/entity2('ket')/entity3", "value": [ { ..., "entity4@odata.context": "https://host:port/$metadata#entity1('key')/entity2('key')/entity3('key')('key')/entity4", "entity4": [ { ... } ] }
This causes an exception when executing with Microsoft's OData Client:
"The context URL 'https://host:port/$metadata#entity1('key')/entity2('key')/entity3('key')('key')/entity4' is invalid."
The text was updated successfully, but these errors were encountered:
I've found a workaround:
Using a $filter instead of a key: /entity1('key')/entity2('key')/entity3?$filter=Key eq 'key'&$expand=entity4 provides the correct response:
$filter
/entity1('key')/entity2('key')/entity3?$filter=Key eq 'key'&$expand=entity4
"@odata.context": "https://host:port/$metadata#entity1('key')/entity2('ket')/entity3", "value": [ { ..., "entity4@odata.context": "https://host:port/$metadata#entity1('key')/entity2('key')/entity3('key')/entity4" , "entity4": [ { ... } ] }
Sorry, something went wrong.
mikepizzo
No branches or pull requests
Observed in System.Web.OData 5.9.1 & 6.0.0
I have exposed the the following endpoint:
/entity1('key')/entity2('key')/entity3('key')/entity4('key')
When I execute
/entity1('key')/entity2('key')/entity3?$expand=entity4
I receive a JSON response with the correct"@odata.context"
:When I execute
/entity1('key')/entity2('key')/entity3('key')?$expand=entity4
however, I receive an incorrect"@odata.context"
with two keys:This causes an exception when executing with Microsoft's OData Client:
"The context URL 'https://host:port/$metadata#entity1('key')/entity2('key')/entity3('key')('key')/entity4' is invalid."
The text was updated successfully, but these errors were encountered: