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

Allow index segments in path expressions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.02
    • Component/s: ABNF, URL Conventions
    • Labels:
      None

      Description

      OData already allows numeric index segments for ordered collections in the path part of the URL, see ODATA-820.

      Allow this also in Path Expressions:

      GET Entries?$expand=components($orderby=name))&$orderby=components/0/name
      

      Note: the index in $orderby is evaluated on the implicit server-defined order of the components as $orderby has to be evaluated before $expand. This is somewhat counter-intuitive and could be remedied by further extending the path syntax to e.g.

      $orderby=components($orderby=name)/0/name
      

      With that however it would be more "natural" to use a nested $index option instead of an index segment:

      $orderby=components($orderby=name;$index=0)/name
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: