A stable identifier keeps the same association with an entity over its relevant lifetime. Array indexes usually fail this test: inserting an item or replacing an array can change which entity an index identifies. section 8.3.3
For individually addressable repeated-field items:
- Do not retrieve or update an item by index; index-based access implies uniqueness and a stable ordering that the API may not guarantee. section 8.3.3
- Use a map with stable local unique identifiers or expose items as sub-resources with global unique identifiers. section 8.3.3
An unstable administrator update
A ChatRoom containing administrators should not accept a PATCH that means “update the administrator at index 0.” The index can identify a different user after insertion or replacement. section 8.3.3
