OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-498) Error with m:type in Example 31 of Atom


     [ http://tools.oasis-open.org/issues/browse/ODATA-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-498:
-----------------------------

    Description: 
Example 31 of atom shows the encoding for a collection of addresses. The metadata:context attribute of the <edm:value> element shows the collection to be of type Collection(Model.Address), but erroneously has an m:type attribute of "#Model.BaseAddress". The first metadata:element has no m:type attribute (which is fine, if it is the base type of the collection type) and the second element explicitly says the type is Model.Address. 

Same problem in Part 1, example 67, with a JSON payload

  was:Example 31 of atom shows the encoding for a collection of addresses. The metadata:context attribute of the <edm:value> element shows the collection to be of type Collection(Model.Address), but erroneously has an m:type attribute of "#Model.BaseAddress". The first metadata:element has no m:type attribute (which is fine, if it is the base type of the collection type) and the second element explicitly says the type is Model.Address. 

       Proposal: 
make the type of the collection in the metadata:context attribute Collection(Model.BaseAddress) and remove the m:type element from the <value> element, as in:

<metadata:value xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata";
  metadata:context="http://host/service/$metadata#Collection(Model.BaseAddress)"
  xmlns="http://docs.oasis-open.org/odata/ns/data";
>
  <metadata:element>
    <Street>Obere Str. 57</Street>  
    <City>Berlin</City>  
    <PostalCode>D-12209</PostalCode>  
  </metadata:element>
  <metadata:element metadata:type="#Model.Address">
    <Street>12345 Grant Street</Street>  
    <City>Taft</City>  
    <Region>Ohio</Region>  
    <PostalCode>OH 98052</PostalCode>  
  </metadata:element>
</metadata:value>


Accepted: https://www.oasis-open.org/committees/download.php/50677/odata-meeting-51_on-20130912-minutes.html#odata-498


Part 1, example 67, line 2, should be:

  "odata.type":"#Northwind.Manager",

  was:
make the type of the collection in the metadata:context attribute Collection(Model.BaseAddress) and remove the m:type element from the <value> element, as in:

<metadata:value xmlns:metadata="http://docs.oasis-open.org/odata/ns/metadata";
  metadata:context="http://host/service/$metadata#Collection(Model.BaseAddress)"
  xmlns="http://docs.oasis-open.org/odata/ns/data";
>
  <metadata:element>
    <Street>Obere Str. 57</Street>  
    <City>Berlin</City>  
    <PostalCode>D-12209</PostalCode>  
  </metadata:element>
  <metadata:element metadata:type="#Model.Address">
    <Street>12345 Grant Street</Street>  
    <City>Taft</City>  
    <Region>Ohio</Region>  
    <PostalCode>OH 98052</PostalCode>  
  </metadata:element>
</metadata:value>


Accepted: https://www.oasis-open.org/committees/download.php/50677/odata-meeting-51_on-20130912-minutes.html#odata-498

    Component/s: OData Protocol 

Added similar issue in Part 1, discovered after resolving this issue.

> Error with m:type in Example 31 of Atom
> ---------------------------------------
>
>                 Key: ODATA-498
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-498
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData ATOM Format , OData Protocol 
>    Affects Versions: V4.0_CS
>         Environment: [Proposed]
>            Reporter: Michael Pizzo
>            Priority: Minor
>             Fix For: V4.0_ERRATA01
>
>
> Example 31 of atom shows the encoding for a collection of addresses. The metadata:context attribute of the <edm:value> element shows the collection to be of type Collection(Model.Address), but erroneously has an m:type attribute of "#Model.BaseAddress". The first metadata:element has no m:type attribute (which is fine, if it is the base type of the collection type) and the second element explicitly says the type is Model.Address. 
> Same problem in Part 1, example 67, with a JSON payload

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]