[PR #5992] [MERGED] Closes #5981: Add display field to all REST API serializers #13081

Closed
opened 2025-12-29 22:25:18 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5992
Author: @jeremystretch
Created: 3/16/2021
Status: Merged
Merged: 3/16/2021
Merged by: @jeremystretch

Base: featureHead: 5891-api-serializer-display


📝 Commits (2)

  • fb48c1f Add 'display' field to all REST API serializers
  • c64f96d Drop usage of display_field on DynamicModelChoiceFields

📊 Changes

32 files changed (+297 additions, -322 deletions)

View changed files

📝 docs/release-notes/version-2.11.md (+2 -0)
📝 netbox/circuits/api/nested_serializers.py (+4 -4)
📝 netbox/circuits/api/serializers.py (+14 -10)
📝 netbox/circuits/tests/test_api.py (+4 -4)
📝 netbox/dcim/api/nested_serializers.py (+34 -34)
📝 netbox/dcim/api/serializers.py (+68 -59)
📝 netbox/dcim/forms.py (+2 -36)
📝 netbox/dcim/tests/test_api.py (+31 -31)
📝 netbox/extras/api/nested_serializers.py (+6 -6)
📝 netbox/extras/api/serializers.py (+23 -19)
📝 netbox/extras/forms.py (+0 -2)
📝 netbox/extras/tests/test_api.py (+7 -7)
📝 netbox/ipam/api/nested_serializers.py (+10 -10)
📝 netbox/ipam/api/serializers.py (+16 -15)
📝 netbox/ipam/forms.py (+6 -17)
📝 netbox/ipam/tests/test_api.py (+10 -10)
📝 netbox/netbox/api/serializers.py (+10 -3)
📝 netbox/secrets/api/nested_serializers.py (+2 -2)
📝 netbox/secrets/api/serializers.py (+4 -3)
📝 netbox/secrets/forms.py (+1 -2)

...and 12 more files

📄 Description

Closes: #5891

  • Add a display field to every REST API serializer, conveying a human-friendly simple name for the serialized object
  • Discontinue use of display_field by DynamicModelChoiceFields

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/5992 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/16/2021 **Status:** ✅ Merged **Merged:** 3/16/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `5891-api-serializer-display` --- ### 📝 Commits (2) - [`fb48c1f`](https://github.com/netbox-community/netbox/commit/fb48c1f6dd20595512b36efa3b7269b5bd131f68) Add 'display' field to all REST API serializers - [`c64f96d`](https://github.com/netbox-community/netbox/commit/c64f96d65bf6f7f263b00de9544f8e3cd119472e) Drop usage of display_field on DynamicModelChoiceFields ### 📊 Changes **32 files changed** (+297 additions, -322 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.11.md` (+2 -0) 📝 `netbox/circuits/api/nested_serializers.py` (+4 -4) 📝 `netbox/circuits/api/serializers.py` (+14 -10) 📝 `netbox/circuits/tests/test_api.py` (+4 -4) 📝 `netbox/dcim/api/nested_serializers.py` (+34 -34) 📝 `netbox/dcim/api/serializers.py` (+68 -59) 📝 `netbox/dcim/forms.py` (+2 -36) 📝 `netbox/dcim/tests/test_api.py` (+31 -31) 📝 `netbox/extras/api/nested_serializers.py` (+6 -6) 📝 `netbox/extras/api/serializers.py` (+23 -19) 📝 `netbox/extras/forms.py` (+0 -2) 📝 `netbox/extras/tests/test_api.py` (+7 -7) 📝 `netbox/ipam/api/nested_serializers.py` (+10 -10) 📝 `netbox/ipam/api/serializers.py` (+16 -15) 📝 `netbox/ipam/forms.py` (+6 -17) 📝 `netbox/ipam/tests/test_api.py` (+10 -10) 📝 `netbox/netbox/api/serializers.py` (+10 -3) 📝 `netbox/secrets/api/nested_serializers.py` (+2 -2) 📝 `netbox/secrets/api/serializers.py` (+4 -3) 📝 `netbox/secrets/forms.py` (+1 -2) _...and 12 more files_ </details> ### 📄 Description ### Closes: #5891 - Add a `display` field to every REST API serializer, conveying a human-friendly simple name for the serialized object - Discontinue use of `display_field` by DynamicModelChoiceFields --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:25:18 +01:00
adam closed this issue 2025-12-29 22:25:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13081