-
Proposal:
Hide
Change syntax to
$epand=NavProp/$ref(<nested options>)
and define a different set following $ref than the one directly following the navigation property:
expand = '$expand' EQ expandItem *( COMMA expandItem )
expandItem = [ qualifiedEntityTypeName "/" ] navigationProperty
[ "/" qualifiedEntityTypeName ]
[ ref OPEN expandRefOption *( SEMI expandRefOption ) CLOSE
/ OPEN expandOption *( SEMI expandOption ) CLOSE ]
expandRefOption = filter
/ search
/ skip
/ top
/ inlinecount
expandOption = expandRefOption
/ select
/ orderby
/ expand
/ levels
Rationale: we now express in the ABNF what is meaningful and thus allowed after /$ref.
Also this allows parsing from left to right.
And putting /$ref before the parens makes it a bit more obvious. Just try reading
$expand=Items($filter=something very complicated and lengthy and I'll only tell you afterwards that I only want)/$ref&andsoon
Show
Change syntax to
$epand=NavProp/$ref(<nested options>)
and define a different set following $ref than the one directly following the navigation property:
expand = '$expand' EQ expandItem *( COMMA expandItem )
expandItem = [ qualifiedEntityTypeName "/" ] navigationProperty
[ "/" qualifiedEntityTypeName ]
[ ref OPEN expandRefOption *( SEMI expandRefOption ) CLOSE
/ OPEN expandOption *( SEMI expandOption ) CLOSE ]
expandRefOption = filter
/ search
/ skip
/ top
/ inlinecount
expandOption = expandRefOption
/ select
/ orderby
/ expand
/ levels
Rationale: we now express in the ABNF what is meaningful and thus allowed after /$ref.
Also this allows parsing from left to right.
And putting /$ref before the parens makes it a bit more obvious. Just try reading
$expand=Items($filter=something very complicated and lengthy and I'll only tell you afterwards that I only want)/$ref&andsoon
-
Resolution:
Show
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-construction-rules-v4.0-wd01.txt?rev=253
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-testcases.xml?rev=253
Accepted: https://www.oasis-open.org/committees/download.php/49055/odata-meeting-35_on-20130502-minutes.html#odata-345
$expand allows nesting query options after the name of the navigation properties to be expanded.
When expanding only references $select, $expand, and $levels don't make sense as neither structural nor navigation properties are represented in references.
{"report":{"apdex":1,"isInitial":true,"journeyId":"cfc5f969-42ff-4de8-810d-96ccd249d831","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":812.0999999046326,"redirectCount":0,"resourceLoadedEnd":883.5,"resourceLoadedStart":221.59999990463257,"resourceTiming":[{"duration":217.59999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":221.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":439.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":217.80000019073486,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":221.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":439.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":218.19999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":222.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":440.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":218.40000009536743,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":222.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":440.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":219.19999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":222.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":441.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":272.80000019073486,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":222.69999980926514,"connectEnd":222.69999980926514,"connectStart":222.69999980926514,"domainLookupEnd":222.69999980926514,"domainLookupStart":222.69999980926514,"fetchStart":222.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":222.69999980926514,"responseEnd":495.5,"responseStart":495.5,"secureConnectionStart":222.69999980926514},{"duration":285.7000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":223.2999997138977,"connectEnd":223.2999997138977,"connectStart":223.2999997138977,"domainLookupEnd":223.2999997138977,"domainLookupStart":223.2999997138977,"fetchStart":223.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":223.2999997138977,"responseEnd":509,"responseStart":509,"secureConnectionStart":223.2999997138977},{"duration":287.7999997138977,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":223.5,"connectEnd":223.5,"connectStart":223.5,"domainLookupEnd":223.5,"domainLookupStart":223.5,"fetchStart":223.5,"redirectEnd":0,"redirectStart":0,"requestStart":223.5,"responseEnd":511.2999997138977,"responseStart":511.2999997138977,"secureConnectionStart":223.5},{"duration":288,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":223.69999980926514,"connectEnd":223.69999980926514,"connectStart":223.69999980926514,"domainLookupEnd":223.69999980926514,"domainLookupStart":223.69999980926514,"fetchStart":223.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":223.69999980926514,"responseEnd":511.69999980926514,"responseStart":511.69999980926514,"secureConnectionStart":223.69999980926514},{"duration":288.2000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":223.7999997138977,"connectEnd":223.7999997138977,"connectStart":223.7999997138977,"domainLookupEnd":223.7999997138977,"domainLookupStart":223.7999997138977,"fetchStart":223.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":223.7999997138977,"responseEnd":512,"responseStart":512,"secureConnectionStart":223.7999997138977},{"duration":288.59999990463257,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":224,"connectEnd":224,"connectStart":224,"domainLookupEnd":224,"domainLookupStart":224,"fetchStart":224,"redirectEnd":0,"redirectStart":0,"requestStart":224,"responseEnd":512.5999999046326,"responseStart":512.5999999046326,"secureConnectionStart":224},{"duration":289.09999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":224.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":224.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":513.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":288.80000019073486,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":224.2999997138977,"connectEnd":224.2999997138977,"connectStart":224.2999997138977,"domainLookupEnd":224.2999997138977,"domainLookupStart":224.2999997138977,"fetchStart":224.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":224.2999997138977,"responseEnd":513.0999999046326,"responseStart":513.0999999046326,"secureConnectionStart":224.2999997138977},{"duration":261.2999997138977,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":253.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":515.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":325.80000019073486,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":254.09999990463257,"connectEnd":254.09999990463257,"connectStart":254.09999990463257,"domainLookupEnd":254.09999990463257,"domainLookupStart":254.09999990463257,"fetchStart":254.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":254.09999990463257,"responseEnd":579.9000000953674,"responseStart":579.7999997138977,"secureConnectionStart":254.09999990463257}],"threshold":1000,"fetchStart":0,"domainLookupStart":117,"domainLookupEnd":117,"connectStart":117,"connectEnd":166,"secureConnectionStart":142,"requestStart":166,"responseStart":214,"responseEnd":287,"domLoading":217,"domInteractive":905,"domContentLoadedEventStart":905,"domContentLoadedEventEnd":946,"domComplete":1113,"loadEventStart":1113,"loadEventEnd":1117,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"3f58bc3ece969c","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":13,"dbConnsTimeInMs":16,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
Also see
ODATA-340; wouldn't it make more sense to simply not allow $ref in expand but rather treat it as a 'special' property allowed in the $select? Could we even use in combination with other properties potentially?