-
Proposal:
Hide
Clients can explicitly select a set of properties through $select, and can specify $select=* for all structural properties.
Services must return all selected properties and can return other non-selected properties.
In the absence of a select, the service returns a default set of properties that must include all key properties.
Any time the service returns less than the full set of properties (either because the client specified a select or because the service returned a subset of properties in the absence of a select) the metadata url must reflect the set of selected properties.
If a select is present in a metadata url, it must include all expanded navigation properties.
Accepted: https://www.oasis-open.org/committees/download.php/49447/odata-meeting-40_on-20130606-minutes.html#odata-316
Show
Clients can explicitly select a set of properties through $select, and can specify $select=* for all structural properties.
Services must return all selected properties and can return other non-selected properties.
In the absence of a select, the service returns a default set of properties that must include all key properties.
Any time the service returns less than the full set of properties (either because the client specified a select or because the service returned a subset of properties in the absence of a select) the metadata url must reflect the set of selected properties.
If a select is present in a metadata url, it must include all expanded navigation properties.
Accepted: https://www.oasis-open.org/committees/download.php/49447/odata-meeting-40_on-20130606-minutes.html#odata-316
-
Resolution:
Show
https://www.oasis-open.org/committees/download.php/49613/odata-v4.0-wd02-part1-protocol-2013-06-19.docx
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Core.V1.xml?rev=377
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Capabilities.V1.xml?rev=379
https://www.oasis-open.org/committees/download.php/49614/odata-v4.0-wd02-part2-url-conventions-2013-06-19.docx
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-construction-rules.txt?rev=380
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-testcases.xml?rev=380
https://www.oasis-open.org/committees/download.php/49615/odata-v4.0-wd02-part3-csdl-2013-06-19.docx
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/edmx.xsd?rev=357
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/edm.xsd?rev=377
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/MetadataService.edmx?rev=374
https://www.oasis-open.org/committees/download.php/49611/odata-atom-format-v4.0-wd02-2013-06-19.docx
https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/metadata.xsd?rev=382
https://www.oasis-open.org/committees/download.php/49612/odata-json-format-v4.0-wd02-2013-06-19.docx
Properties not present in a request payload are already interpreted as having the default value (if defined in $metadata) or the null value (if nullable and without default value).
Why not allow the same for responses.
{"report":{"apdex":1,"isInitial":true,"journeyId":"9e8bf1e9-0c04-4abf-ba04-1a73fb7a1b4d","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":775.9000000953674,"redirectCount":0,"resourceLoadedEnd":1424,"resourceLoadedStart":307,"resourceTiming":[{"duration":94.40000009536743,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":307,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":401.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":94.5,"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":307.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":401.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":94.69999980926514,"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":307.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":402.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":95.30000019073486,"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":307.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":95.5,"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":307.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":144.90000009536743,"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":308.09999990463257,"connectEnd":308.09999990463257,"connectStart":308.09999990463257,"domainLookupEnd":308.09999990463257,"domainLookupStart":308.09999990463257,"fetchStart":308.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":308.09999990463257,"responseEnd":453,"responseStart":453,"secureConnectionStart":308.09999990463257},{"duration":177.2000002861023,"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":308.7999997138977,"connectEnd":308.7999997138977,"connectStart":308.7999997138977,"domainLookupEnd":308.7999997138977,"domainLookupStart":308.7999997138977,"fetchStart":308.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":308.7999997138977,"responseEnd":486,"responseStart":486,"secureConnectionStart":308.7999997138977},{"duration":179.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":308.90000009536743,"connectEnd":308.90000009536743,"connectStart":308.90000009536743,"domainLookupEnd":308.90000009536743,"domainLookupStart":308.90000009536743,"fetchStart":308.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":308.90000009536743,"responseEnd":488.40000009536743,"responseStart":488.40000009536743,"secureConnectionStart":308.90000009536743},{"duration":179.7000002861023,"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":309.19999980926514,"connectEnd":309.19999980926514,"connectStart":309.19999980926514,"domainLookupEnd":309.19999980926514,"domainLookupStart":309.19999980926514,"fetchStart":309.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":309.19999980926514,"responseEnd":488.90000009536743,"responseStart":488.90000009536743,"secureConnectionStart":309.19999980926514},{"duration":180.10000038146973,"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":309.2999997138977,"connectEnd":309.2999997138977,"connectStart":309.2999997138977,"domainLookupEnd":309.2999997138977,"domainLookupStart":309.2999997138977,"fetchStart":309.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":309.2999997138977,"responseEnd":489.40000009536743,"responseStart":489.40000009536743,"secureConnectionStart":309.2999997138977},{"duration":180.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":309.5,"connectEnd":309.5,"connectStart":309.5,"domainLookupEnd":309.5,"domainLookupStart":309.5,"fetchStart":309.5,"redirectEnd":0,"redirectStart":0,"requestStart":309.5,"responseEnd":489.69999980926514,"responseStart":489.69999980926514,"secureConnectionStart":309.5},{"duration":285.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":309.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":309.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":594.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":180.39999961853027,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":309.90000009536743,"connectEnd":309.90000009536743,"connectStart":309.90000009536743,"domainLookupEnd":309.90000009536743,"domainLookupStart":309.90000009536743,"fetchStart":309.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":309.90000009536743,"responseEnd":490.2999997138977,"responseStart":490.2999997138977,"secureConnectionStart":309.90000009536743},{"duration":255.2000002861023,"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":339.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":595,"responseStart":0,"secureConnectionStart":0},{"duration":158.40000009536743,"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":340,"connectEnd":340,"connectStart":340,"domainLookupEnd":340,"domainLookupStart":340,"fetchStart":340,"redirectEnd":0,"redirectStart":0,"requestStart":340,"responseEnd":498.40000009536743,"responseStart":498.40000009536743,"secureConnectionStart":340}],"threshold":1000,"fetchStart":0,"domainLookupStart":199,"domainLookupEnd":199,"connectStart":199,"connectEnd":249,"secureConnectionStart":224,"requestStart":249,"responseStart":299,"responseEnd":370,"domLoading":302,"domInteractive":1448,"domContentLoadedEventStart":1448,"domContentLoadedEventEnd":1498,"domComplete":1853,"loadEventStart":1853,"loadEventEnd":1855,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"b52d49c48917d3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":11,"dbConnsTimeInMs":13,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
Assuming that the value of omitted properties is null or default values seems dangerous.
There may be multiple reasons that a service omits values; there may be permissions issues, certain properties may be expensive compute, etc.
We should say that, in the absence of $select, services may return a subset of properties defined in the $metadata. If $select is specified, each property must be returned or an error generated.
Client should never make assumptions about missing properties.