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

Representation of named entities in the service document

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ATOM Format, JSON Format
    • Labels:
      None
    • Environment:

      [Proposed]

    • Proposal:
      Hide

      Atom: define <metadata:entity title="..." href="..." /> extension element for the AtomPub service document. Add one element per named entity.

      • title attribute has same value as Name attribute of <edm:Entity> element.
      • href attribute contains link to named entity

      (New) JSON: use a single array named "value" and add a new "kind" property that is either "EntitySet" or "Entity".
      Example:

      {
      "odata.metadata": "http://host/service/$metadata",
      "value": [

      { "name": "Orders", "kind": "EntitySet" "url": "Orders" }

      ,

      { "name": "OrderDetails", "kind": "EntitySet" "url": "OrderDetails" }

      ,

      { "name": "Contoso", "kind": "Entity" "url": "Contoso" }

      ]
      }

      Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47722/latest/odata-meeting-18_on-20121213-minutes.html

      Show
      Atom: define <metadata:entity title="..." href="..." /> extension element for the AtomPub service document. Add one element per named entity. title attribute has same value as Name attribute of <edm:Entity> element. href attribute contains link to named entity (New) JSON: use a single array named "value" and add a new "kind" property that is either "EntitySet" or "Entity". Example: { "odata.metadata": "http://host/service/$metadata", "value": [ { "name": "Orders", "kind": "EntitySet" "url": "Orders" } , { "name": "OrderDetails", "kind": "EntitySet" "url": "OrderDetails" } , { "name": "Contoso", "kind": "Entity" "url": "Contoso" } ] } Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47722/latest/odata-meeting-18_on-20121213-minutes.html
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/48030/odata-json-format-v1.0-wd01-2013-01-25.doc https://www.oasis-open.org/committees/download.php/48214/odata-atom-format-v1.0-wd01-2013-2-11-MP.docx Accepted: https://www.oasis-open.org/committees/download.php/48269/odata-meeting-25_on-20130214-minutes.html#odata-169

      Description

      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/46576/Association%20Simplification.pptx introduced the concept of Named Entities that are children of the entity container.

      As these were important enough to get named, they should be advertised in the service document.

        Attachments

          Activity

          ralfhandl Ralf Handl created issue -
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          I like the format for ATOM, but would like the JSON format to be similar. i.e., a single array that differentiates between the different types of things in the service document. this could give us the ability to add other things to the service document in the future (such as functions/actions, nested service documents, etc.)

          I would suggest for JSON that we simply add a "kind" property that is "collection" for collections (as we have now, and consistent with ATOM) and "entity" for named entities (consistent with the new metadata:entity element added to JSON).

          Show
          mikep Michael Pizzo (Inactive) added a comment - I like the format for ATOM, but would like the JSON format to be similar. i.e., a single array that differentiates between the different types of things in the service document. this could give us the ability to add other things to the service document in the future (such as functions/actions, nested service documents, etc.) I would suggest for JSON that we simply add a "kind" property that is "collection" for collections (as we have now, and consistent with ATOM) and "entity" for named entities (consistent with the new metadata:entity element added to JSON).
          ralfhandl Ralf Handl made changes -
          Field Original Value New Value
          Proposal Atom: define <metadata:entity title="..." href="..." /> extension element for the AtomPub service document. Add one element per named entity.
          - title attribute has same value as Name attribute of <edm:Entity> element.
          - href attribute contains link to named entity


          (New) JSON:
          - use "entitysets" in JSON service document as name for entity set array (instead of "value")
          - use "entities" as name for entity array with same structure as EntitySet array (name, url)
          Atom: define <metadata:entity title="..." href="..." /> extension element for the AtomPub service document. Add one element per named entity.
          - title attribute has same value as Name attribute of <edm:Entity> element.
          - href attribute contains link to named entity


          (New) JSON: use a single array named "value" and add a new "kind" property that is either "EntitySet" or "Entity".
          Example:

          {
            "odata.metadata": "http://host/service/$metadata",
            "value": [
              { "name": "Orders", "kind": "EntitySet" "url": "Orders" },
              { "name": "OrderDetails", "kind": "EntitySet" "url": "OrderDetails" },
              { "name": "Contoso", "kind": "Entity" "url": "Contoso" }
            ]
          }

          Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47722/latest/odata-meeting-18_on-20121213-minutes.html
          Status New [ 10000 ] Open [ 1 ]
          ralfhandl Ralf Handl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          handl Ralf Handl made changes -
          Reporter Ralf Handl [ ralfhandl ] Ralf Handl [ handl ]
          handl Ralf Handl made changes -
          Assignee Ralf Handl [ handl ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: