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

Support external metadata references in payload

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      OData services may link to other external services. Where the target of that link is an entity or collection of entities we use navigation links.

      For cases where the type of the related entity is not known in metadata (either because it is a dynamic navigation property or the type is defined as Edm.EntityType or Collection(Edm.EntityType) in order to avoid referencing other type definitions from $metadata) clients consuming the feed need some way of discovering the type of a particular entity.

      We have two ways of conveying type information; we use odata.metadata to convey the metadata that describes the result, and odata.type to describe the type of a property within the result.
      Today we have only one odata.metadata annotation, at the top level, and we expect all odata.type annotations to be referenced from within that odata.metadata. This doesn't allow individual instances to link to entities in other services without referencing the metadata in their own service document.

      We have a similar requirement where an instance in a feed is a derived type of the base type but that derived type is not defined or referenced by the $metadata of the response.

      We have two (compatible) choices:
      1) Allow odata.type to contain a full url to a metadata description of the related type, or
      2) Allow the navigation property (whether present in the payload or not) to be annotated with the odata.metadata annotation.

      For derived types I prefer #1 as we already use odata.type for derived types.

      For navigation properties I prefer #2 as it is more expressive and allows "rebasing" the root metadata for nested expanded content.

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: