Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-498

Error with m:type in Example 31 of Atom

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS01
    • Fix Version/s: V4.0_CSD03
    • Component/s: ATOM Format
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      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",

      Show
      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",
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/50765/odata-atom-format-v4.0-wd04-2013-09-20.docx Applied: https://www.oasis-open.org/committees/download.php/50877/odata-meeting-54_on-20131001-minutes.html#ga_01

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: