fish
Guppy
Posts: 65
|
Post by fish on Jan 5, 2018 13:37:31 GMT
I find this in 1.3 specification:
6.5.4.4. ETag property ETags provide the ability to conditionally retrieve or update a resource. Resources should include an ETag property named "@odata.etag". The value of the ETag property is the ETag for a resource.
But I cant find @odata.etag in any (JSON) schema in schema bundle 2017.2. Where is it? Or is it missing?
I guess ETag header should be more important anyway?
|
|
|
Post by gericson on Jan 5, 2018 14:45:14 GMT
|
|
fish
Guppy
Posts: 65
|
Post by fish on Jan 5, 2018 15:11:32 GMT
OK. But I can find @odata.context, @odata.id and @odata.type defined as properties on "base" type Resource in schema Resource.v1_5_0.json, which uses reference to definitions of properties "id", "context" and "type" in schema odata.4.0.0.json.
These type definitions in odata.4.0.0 schema are also used for @odata.context, @odata.id and @odata.type properties in most other resource schemas such as ComputerSystem and Chassis as far as I can see.?
But why cant I find similar definition of "@odata.etag" in e.g. schema odata.4.0.0.json ? And why is not @odata.etag property included in ComputerSystem and Chassis (or other schemas) in same way as @odata.id and @odata.type properties?
|
|
|
Post by jautor on Jan 5, 2018 15:46:26 GMT
Yeah, that's a bug - thanks for pointing that out. The "@odata.etag" property is called out in the specification, and will validate against our schemas because of the "@odata" pattern match, but we do call out the other defined (and in most cases, required) @odata properties in each JSON schema. I'll open an issue with the group to get it added in the next release.
Jeff
|
|
|
Post by malbolge on Dec 31, 2019 14:58:41 GMT
To clarify, the bugfix should be on the odata side, them adding an odata.etag property?
|
|
|
Post by jautor on Dec 31, 2019 17:32:14 GMT
To clarify, the bugfix should be on the odata side, them adding an odata.etag property? No, that's already defined by OData as an "annotation" property (hence the "@odata.<name>" format), and that's why you don't see it in the CSDL schema definitions (annotations are not "properties" in OData XML terms, but in the JSON payload format that is how they show up). We've duplicated those definitions in a JSON schema for clarity. The "etag" annotation was added to our odata-v4.json schema file back in the 2019.1 timeframe. Jeff
|
|