IPA-124: Repeated Fields
Providing clients with lists of data can be complex. Aligning on a single strategy for providing clients with repeated fields allows the complexity to be reduced when clients need to modify the lists.
State
Adopt
Guidance
- Repeated fields must use a plural field name
- Repeated fields should have an enforced upper bound that will not cause a
single resource payload to become too large
- A good rule of thumb is 100 elements
- If repeated data has the chance of being too large, the API should use a sub-resource instead
Update Strategy
- A resource may use one of two strategies to enable updating a repeated
field:
- Direct update using the standard Update method
- A standard
Update
method is only able to update the entire list
- A standard
- Custom
Add
andRemove
methods- When choosing a custom method approach, API consumers must not be able to set the field via Create or Update operations
- Direct update using the standard Update method