[PR #2429] [MERGED] Fix type mismatches in API view #12368

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2429
Author: @tatsushid
Created: 9/15/2018
Status: Merged
Merged: 11/27/2018
Merged by: @jeremystretch

Base: developHead: fix/type_mismatch_in_api_view


📝 Commits (3)

  • d061b97 Fix tags field to be shown as array in API view
  • c2c60ce Fix SerializedPKRelatedField type API expression
  • bc2d05e Fix request parameter representation in API view

📊 Changes

3 files changed (+49 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 netbox/netbox/settings.py (+3 -0)
📝 netbox/utilities/custom_inspectors.py (+45 -2)

📄 Description

This is a fix for issue #2400 but includes some other API view issue fixes by introducing a sub class of SwaggerAutoSchema and some FieldInspectors.

I've searched a way not to replace SwaggerAutoSchema but as I wrote in a commit message, I could not find others which can distinguish a request from a response except overriding SwaggerAutoSchema.get_request_serializer(self).

Please feel free to comment.


🔄 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/2429 **Author:** [@tatsushid](https://github.com/tatsushid) **Created:** 9/15/2018 **Status:** ✅ Merged **Merged:** 11/27/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `fix/type_mismatch_in_api_view` --- ### 📝 Commits (3) - [`d061b97`](https://github.com/netbox-community/netbox/commit/d061b975c4ad771935d4c9a8fa4394c5a3114c0f) Fix tags field to be shown as array in API view - [`c2c60ce`](https://github.com/netbox-community/netbox/commit/c2c60ce2d7ba5ddd5a18a1340fb12375361534a9) Fix SerializedPKRelatedField type API expression - [`bc2d05e`](https://github.com/netbox-community/netbox/commit/bc2d05e73fde699ec312764f8c8901ff4265ce7b) Fix request parameter representation in API view ### 📊 Changes **3 files changed** (+49 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `netbox/netbox/settings.py` (+3 -0) 📝 `netbox/utilities/custom_inspectors.py` (+45 -2) </details> ### 📄 Description This is a fix for issue #2400 but includes some other API view issue fixes by introducing a sub class of `SwaggerAutoSchema` and some `FieldInspector`s. I've searched a way not to replace `SwaggerAutoSchema` but as I wrote in a commit message, I could not find others which can distinguish a request from a response except overriding `SwaggerAutoSchema.get_request_serializer(self)`. Please feel free to comment. --- <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:21:07 +01:00
adam closed this issue 2025-12-29 22:21:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12368