[
https://issues.apache.org/jira/browse/OLINGO-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519512#comment-14519512
]
Ramesh Reddy commented on OLINGO-641:
-------------------------------------
The language in the spec reads like below from
[http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata02/os/odata-json-format-v4.0-errata02-os-complete.html#_Toc403940606]
{quote}
In addition, odata annotations MUST appear in the payload for cases where
actual values are not the same as the computed values and MAY appear otherwise.
When odata annotations appear in the payload, they are treated as exceptions to
the computed values.
Media entities and stream properties MAY in addition contain the following
annotations:
· odata.mediaEtag: the ETag of the stream, as appropriate
· odata.mediaContentType: the content type of the stream
{quote}
I read them as to include the edit and read url for the media and stream
properties, and may include the eTag, and contentType properties for media and
stream.
My reason is media and stream properties are actual first class properties of
entity, not like an association or navigation properties, that can be derived
through other means. The only speculative part is they are designed like
annotations, rather then the property tag. Since they have multiple values,
like editUrl, readUrl, eTag, contentType, if the design like other property the
JSON payload will look like a complex property, to avoid it they designed as
annotations.
> Edm.Stream based links are not present in the payload
> -----------------------------------------------------
>
> Key: OLINGO-641
> URL: https://issues.apache.org/jira/browse/OLINGO-641
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Reporter: Ramesh Reddy
>
> When a server returns the EDM.Stream based properties in the payload the JSON
> serializer does not create the required annotations for representing the
> stream properties.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)