Skip to content

Commit a766ecf

Browse files
committed
Clarify listType guidance for struct vs primitive arrays
Update API design documentation to align with ssatags linter behavior: listType=set is discouraged for object arrays due to SSA merge issues, so recommend listType=map for structs and listType=set only for primitives.
1 parent 35fa1a1 commit a766ecf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

website/docs/development/api-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This is located at `spec.resource` in the base object. It is only defined for [m
3232

3333
* Where relevant, the `ResourceSpec` should include a `name` field to allow object name to be overridden.
3434
* All fields should use pre-defined validated types where possible, e.g. `OpenStackName`, `NeutronDescription`, `IPvAny`.
35-
* Lists should have type `set` or `map` where possible, but `atomic` lists may be necessary where a struct has no merge key.
35+
* Lists of structs should use `listType=map` with an appropriate `listMapKey` where possible. `listType=set` should only be used for lists of primitives (e.g., strings). `listType=atomic` may be necessary where a struct has no suitable merge key.
3636

3737
### ResourceStatus
3838

0 commit comments

Comments
 (0)