Migrate the management API read path onto Segment.rules_data.
Scope
- Serialise segment API responses from
Segment.rules_data instead of the nested rule and condition row serializers.
- Drop rule and condition
id from responses.
- Remove the
rules / rules__conditions / rules__rules__conditions prefetch chain from segments/views.py.
- Make sure the OpenAPI spec no longer includes rule and condition IDs.
Acceptance criteria
- Segment responses contain no
id on rules or conditions; conditions expose operator, property, value, description.
- The segment list and retrieve endpoints no longer issue rule or condition queries (assert query counts drop).
- OpenAPI spec and Postman collection no longer include segment rule and condition IDs.
Migrate the management API read path onto
Segment.rules_data.Scope
Segment.rules_datainstead of the nested rule and condition row serializers.idfrom responses.rules/rules__conditions/rules__rules__conditionsprefetch chain fromsegments/views.py.Acceptance criteria
idon rules or conditions; conditions exposeoperator,property,value,description.