Explore using API serializer for ObjectChange representation #3404

Closed
opened 2025-12-29 18:28:47 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (Feb 25, 2020).

Proposed Changes

Explore the benefits and drawbacks of replacing the current ObjectChange serialization mechanism with the REST API serializers. I haven't dug into this yet but believe it's worth a look.

Justification

Consolidating serializers would allow us to ditch some code while ensuring a consistent representation of serialized objects throughout NetBox.

Originally created by @jeremystretch on GitHub (Feb 25, 2020). ### Proposed Changes Explore the benefits and drawbacks of replacing the current ObjectChange serialization mechanism with the REST API serializers. I haven't dug into this yet but believe it's worth a look. ### Justification Consolidating serializers would allow us to ditch some code while ensuring a consistent representation of serialized objects throughout NetBox.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:28:47 +01:00
adam closed this issue 2025-12-29 18:28:47 +01:00
Author
Owner

@sdktr commented on GitHub (Mar 4, 2020):

Ditching duplicate (functionality wise) code, +1

@sdktr commented on GitHub (Mar 4, 2020): Ditching duplicate (functionality wise) code, +1
Author
Owner

@ebusto commented on GitHub (Mar 10, 2020):

I took this approach in the NetBox Kafka producer plugin, and it works like a charm. Having slightly more information in place of foreign keys is really handy.

@ebusto commented on GitHub (Mar 10, 2020): I took this approach in the NetBox Kafka producer [plugin](https://github.com/ebusto/netbox-kafka-producer/blob/master/netbox_kafka_producer/middleware.py#L17), and it works like a charm. Having slightly more information in place of foreign keys is really handy.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3404