-
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":"c1b53608-1d22-4b15-addd-1cca16de8fd2","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":548.2999997138977,"redirectCount":0,"resourceLoadedEnd":384,"resourceLoadedStart":108.59999990463257,"resourceTiming":[{"duration":12.199999809265137,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":108.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":108.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":120.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":12.099999904632568,"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":109.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":109.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":121.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":12.700000286102295,"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":109.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":109.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":122,"responseStart":0,"secureConnectionStart":0},{"duration":13,"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":109.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":109.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":122.5,"responseStart":0,"secureConnectionStart":0},{"duration":13.300000190734863,"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":109.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":109.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":123,"responseStart":0,"secureConnectionStart":0},{"duration":70.10000038146973,"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":109.89999961853027,"connectEnd":109.89999961853027,"connectStart":109.89999961853027,"domainLookupEnd":109.89999961853027,"domainLookupStart":109.89999961853027,"fetchStart":109.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":109.89999961853027,"responseEnd":180,"responseStart":180,"secureConnectionStart":109.89999961853027},{"duration":82.60000038146973,"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":110.39999961853027,"connectEnd":110.39999961853027,"connectStart":110.39999961853027,"domainLookupEnd":110.39999961853027,"domainLookupStart":110.39999961853027,"fetchStart":110.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":110.39999961853027,"responseEnd":193,"responseStart":193,"secureConnectionStart":110.39999961853027},{"duration":84.5,"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":110.59999990463257,"connectEnd":110.59999990463257,"connectStart":110.59999990463257,"domainLookupEnd":110.59999990463257,"domainLookupStart":110.59999990463257,"fetchStart":110.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":110.59999990463257,"responseEnd":195.09999990463257,"responseStart":195.09999990463257,"secureConnectionStart":110.59999990463257},{"duration":84.60000038146973,"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":110.89999961853027,"connectEnd":110.89999961853027,"connectStart":110.89999961853027,"domainLookupEnd":110.89999961853027,"domainLookupStart":110.89999961853027,"fetchStart":110.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":110.89999961853027,"responseEnd":195.5,"responseStart":195.5,"secureConnectionStart":110.89999961853027},{"duration":84.89999961853027,"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":111,"connectEnd":111,"connectStart":111,"domainLookupEnd":111,"domainLookupStart":111,"fetchStart":111,"redirectEnd":0,"redirectStart":0,"requestStart":111,"responseEnd":195.89999961853027,"responseStart":195.89999961853027,"secureConnectionStart":111},{"duration":85.19999980926514,"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":111.09999990463257,"connectEnd":111.09999990463257,"connectStart":111.09999990463257,"domainLookupEnd":111.09999990463257,"domainLookupStart":111.09999990463257,"fetchStart":111.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":111.09999990463257,"responseEnd":196.2999997138977,"responseStart":196.2999997138977,"secureConnectionStart":111.09999990463257},{"duration":85.5,"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":111.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":111.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":196.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":85.2000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":111.39999961853027,"connectEnd":111.39999961853027,"connectStart":111.39999961853027,"domainLookupEnd":111.39999961853027,"domainLookupStart":111.39999961853027,"fetchStart":111.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":111.39999961853027,"responseEnd":196.59999990463257,"responseStart":196.59999990463257,"secureConnectionStart":111.39999961853027},{"duration":56.69999980926514,"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":140.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":197.39999961853027,"responseStart":0,"secureConnectionStart":0},{"duration":56.30000019073486,"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":140.89999961853027,"connectEnd":140.89999961853027,"connectStart":140.89999961853027,"domainLookupEnd":140.89999961853027,"domainLookupStart":140.89999961853027,"fetchStart":140.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":140.89999961853027,"responseEnd":197.19999980926514,"responseStart":197.19999980926514,"secureConnectionStart":140.89999961853027},{"duration":117.89999961853027,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":150.5,"connectEnd":150.5,"connectStart":150.5,"domainLookupEnd":150.5,"domainLookupStart":150.5,"fetchStart":150.5,"redirectEnd":0,"redirectStart":0,"requestStart":150.5,"responseEnd":268.3999996185303,"responseStart":268.3999996185303,"secureConnectionStart":150.5},{"duration":212,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":172,"connectEnd":172,"connectStart":172,"domainLookupEnd":172,"domainLookupStart":172,"fetchStart":172,"redirectEnd":0,"redirectStart":0,"requestStart":172,"responseEnd":384,"responseStart":384,"secureConnectionStart":172},{"duration":149.69999980926514,"initiatorType":"xmlhttprequest","name":"https://issues.oasis-open.org/rest/webResources/1.0/resources","startTime":391.5,"connectEnd":391.5,"connectStart":391.5,"domainLookupEnd":391.5,"domainLookupStart":391.5,"fetchStart":391.5,"redirectEnd":0,"redirectStart":0,"requestStart":391.5,"responseEnd":541.1999998092651,"responseStart":541.1999998092651,"secureConnectionStart":391.5}],"threshold":1000,"fetchStart":0,"domainLookupStart":3,"domainLookupEnd":3,"connectStart":3,"connectEnd":53,"secureConnectionStart":28,"requestStart":54,"responseStart":101,"responseEnd":172,"domLoading":104,"domInteractive":606,"domContentLoadedEventStart":606,"domContentLoadedEventEnd":652,"domComplete":744,"loadEventStart":744,"loadEventEnd":746,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"2e41209e20f3ff","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":88,"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?