Remove obsolete device_role field from REST API serializer for device model #9302

Closed
opened 2025-12-29 20:48:06 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Feb 27, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Drop the device_role property from the Device model, and the field from DeviceSerializer. (It has been superseded by role.)

Justification

The model field was renamed to role under #6391 in v3.6; this field was retained on the serializer for backward compatibility.

Impact

Any REST API clients which still reference the device_role field must be updated to use the role field, which contains the same data (and is writable).

Originally created by @jeremystretch on GitHub (Feb 27, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Drop the `device_role` property from the `Device` model, and the field from `DeviceSerializer`. (It has been superseded by `role`.) ### Justification The model field was renamed to `role` under #6391 in v3.6; this field was retained on the serializer for backward compatibility. ### Impact Any REST API clients which still reference the `device_role` field must be updated to use the `role` field, which contains the same data (and is writable).
adam added the status: acceptedtype: deprecationbreaking change labels 2025-12-29 20:48:06 +01:00
adam closed this issue 2025-12-29 20:48:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9302