Closed (fixed)
Project:
JSON:API
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Oct 2018 at 15:38 UTC
Updated:
6 Nov 2018 at 17:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gabesullicePerhaps it's not actually an internal field... since there isn't a spec defined key for revision IDs.
This would be a good place to standardize with a profile.
Or maybe it is...
Maybe this issue should be "add a
version_idkey to resource objects'metaobject and alias revision ID fields todrupal_internal__{id}Comment #3
wim leersIndeed.
See https://github.com/json-api/json-api/issues/600.
Comment #4
wim leersI see I failed to respond to one part:
I agree with this. Even if the JSON API spec chooses the exact same name, that won't actually be a problem! So: 👍
I'm not sure about this one yet. As long as it's not yet reserved, this is technically premature. On the other hand, I do agree that it's super similar to the "entity ID" case, especially once we have
meta.version_id.So I'm tentatively +1.
Let's hear what @e0ipso thinks.
Comment #5
wim leersComment #6
e0ipsoI'm good with this for consistency. I'm OK with aliases.
One thought, this impacts correction of auto generated schemas.
One question, is there any impact on the revision propertie/s on the payload?
Comment #7
gabesulliceThat won't even happen, because
version_idhas an underscore in it :),"meta":{"version_id":1234567890}^ I count 33 bytes. 33 * max 50 resources = 1650 bytes.
drupal_internal__^ 16 bytes. 16 * max 50 resources = 800 bytes.
So, yes. It does. Likely less with gzip. As with anything I guess it's a trade-off:
That's REST, good or bad :shrug:
Comment #8
wim leersD'oh, of course!
#7: where did that long quote at the end come from? I cannot find it either here nor in https://github.com/json-api/json-api/issues/600.
Comment #9
gabesulliceRoy Fielding. I linked as directly to it as I could via the word "REST" in #7.
Comment #10
wim leersD'oh, ofc, I see.
Comment #11
gabesulliceComment #12
gabesulliceHere's the first salvo. Let's see what breaks.
Comment #14
gabesulliceWhile the test ran, I drafted a CR: https://www.drupal.org/node/3008622
Comment #15
gabesulliceAlright, here we update the test expectations.
I'm not going to add the
version_idkey to any resource object'smetamembers in this issue.I think that should be a separate issue as part of the versioning epic. Until we support revisions, it would be useless extra data.
Comment #16
wim leersAgreed.
This still needs a change record.
Per #6, @e0ipso supports this change. So RTBC'ing.
Two übernits though:
I'd move this line to sit before or after
drupal_internal__id, so that they're visually close.I'd move this line to sit before or after
drupal_internal__mid, so that they're visually close.Like this :)
Comment #18
gabesulliceNope. See #14.
Comment #19
gabesulliceI fixed your nits on commit.