Open ificator opened 4 years ago
1) Annotations in $select/$expand are returned regardless of what is specified in include-annotations. From URL Conventions:
Annotations requested in $select MUST be included in the response; $select overrules the include-annotations preference (see [OData-Protocol]) for the explicitly requested annotations. Additional annotations matching the preference can be included even if not requested via $select. The Preference-Applied response header only reflects the set of annotations included due to the include-annotations preference and not those only included due to $select.
2) According to the ABNF, property annotations are not supported:
annotationInQuery = AT [ namespace "." ] termName [ HASH annotationQualifier ]
For complex-typed properties, you can include the annotation in the nested $select. Seems like a hole in the protocol, though, for instance annotations on non-structured properties (primitive, enum, collection-valued properties).
With this commit
Microsoft.OData.Core
added support for annotations in$select
/$expand
, however this capability is not yet exposed for services utilizingMicrosoft.AspNet.OData
.Current behaviour
The query string parsing done by
Microsoft.OData.Core
succeeds as expected, however the processing of the parsed segments fails inMicrosoft.AspNet.OData
:Open questions
In order to scope the required work it would help to have clarity on the following questions:
$select
/$expand
relate toinclude-annotations
? e.g. mustinclude-annotations=*
orinclude-annotations=ns.foo
be specified for$select=@ns.foo
to work? or are these two distinct mechanisms for defining returned annotations?property@ns.foo
? At a glance it seems like theMicrosoft.OData.Core
change does NOT support this... should it?