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

Rename Metadata URL to Context

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD01
    • Fix Version/s: V4.0_CSD02
    • Component/s: ATOM Format
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      We've been adding a lot of information into the metadata URL: the metadata base URL, the entity set, the derived type, the selected properties, ...

      This requires clients to parse this string, taking away some of the simplicity of using transport formats for structured data (JSON, XML).

      We could represent the metadata URL in parsed syntax:

      JSON

      • rename the odata.metadata annotation to odata.context
      • make it an object with properties
        • url: string
        • set: string
        • type: string (qualified name, (relative) url, "$ref")
        • projection: array of selected properties as strings or objects, the latter having name-value pairs name, recursive, projection

      Atom

      • replace the metadata:metadata attribute with a metadata:context element
      • structure is
        • url: xs:anyUri
        • set: SimpleIdentifier
        • type: string
        • projection: ...

      No change to the odata.metadata=none | full | minimal in the json format parameter.

      In the docs refer to the "odata context".

      Example

      metadata URL:
      "odata.metadata":"http://host/service/$metadata#Employees/Sales.Manager(DirectReports+(FirstName,LastName))"

      context object:
      "odata.context":{
      "url":"http://host/service/$metadata",
      "set":"Employees",
      "type":"Sales.Manager",
      "projection":[
      "*",

      { "property":"DirectReports", "recursive":true, "projection":[ "FirstName", "LastName" ] }

      ]
      }

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: