[ 
https://issues.apache.org/jira/browse/OLINGO-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099926#comment-14099926
 ] 

Francesco Chicchiriccò edited comment on OLINGO-406 at 8/17/14 10:20 AM:
-------------------------------------------------------------------------

As reported by the 
[specification|http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#odataType],
 sending out type information in JSON is required in some cases either with 
minimal metadata - for example with derived and open types:
{quote}
The odata.type annotation MUST appear in minimal or full metadata if the type 
cannot be heuristically determined, as described below, and one of the 
following is true:
·         The type is derived from the type specified for the (collection of) 
entities or (collection of) complex type instances, or

·         The type is for a property whose type is not declared in $metadata.
{quote}


was (Author: ilgrosso):
As reported by the 
[specification|http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#odataType],
 sending out type information in JSON is required in some cases either with 
minimal or no metadata - for example with derived and open types:
{quote}
The odata.type annotation MUST appear in minimal or full metadata if the type 
cannot be heuristically determined, as described below, and one of the 
following is true:
·         The type is derived from the type specified for the (collection of) 
entities or (collection of) complex type instances, or

·         The type is for a property whose type is not declared in $metadata.
{quote}

> Adjust request metadata dependent on specified format
> -----------------------------------------------------
>
>                 Key: OLINGO-406
>                 URL: https://issues.apache.org/jira/browse/OLINGO-406
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>            Reporter: Anthony Elliott
>            Assignee: Michael Bolz
>         Attachments: metadata.diff
>
>
> If I changed the defaultPubFormat to be JSON (minimal metadata, OData 4 
> default) or JSON_NO_METADATA my requests were still sent with full metadata 
> (which our server couldn't handle for some reason). Fixed by checking to see 
> what format is being used before actually writing the metadata. I didn't 
> cover all scenarios in testing, just what we needed, so use this as a 
> starting point. There are likely some optimizations that I didn't bother 
> trying to figure out for our limited scenarios.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to