API Docs - Typo error on /virtualisation/interfaces/ #1706

Closed
opened 2025-12-29 16:34:35 +01:00 by adam · 3 comments
Owner

Originally created by @Keyhaku on GitHub (Apr 27, 2018).

Issue type

[ ] Feature request
[ ] Bug report
[X] Documentation

Environment

  • Python version: 3.6.5
  • NetBox version: 2.3.3

Description

Hello,

On the API documentation it seems there is a little error.

On /virtualisation/interfaces/ endpoint, method POST, the field device is marked as mandatory, but the API only respond to the field virtual_machine.

The error message returned by the API is also misleading :

{
 "non_field_errors": [
   "An interface must belong to either a device or a virtual machine."
 ]
}

It seems the error is also present on /virtualisation/interfaces/{id} methods PUT and PATCH.

Originally created by @Keyhaku on GitHub (Apr 27, 2018). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [X] Documentation <!-- A modification to the documentation --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: 3.6.5 * NetBox version: 2.3.3 <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description Hello, On the API documentation it seems there is a little error. On `/virtualisation/interfaces/` endpoint, method `POST`, the field `device` is marked as mandatory, but the API only respond to the field `virtual_machine`. The error message returned by the API is also misleading : ``` { "non_field_errors": [ "An interface must belong to either a device or a virtual machine." ] } ``` It seems the error is also present on `/virtualisation/interfaces/{id}` methods `PUT` and `PATCH`.
adam added the type: bugstatus: acceptedstatus: blocked labels 2025-12-29 16:34:35 +01:00
adam closed this issue 2025-12-29 16:34:35 +01:00
Author
Owner

@k-nishigaki commented on GitHub (Jul 6, 2018):

I resolved my problem by this report.
thank you so much.

I hope to modified documentation.

@k-nishigaki commented on GitHub (Jul 6, 2018): I resolved my problem by this report. thank you so much. I hope to modified documentation.
Author
Owner

@jeremystretch commented on GitHub (Jul 18, 2018):

My guess is drf-yasg is caching the serializer definition internally by name. Devices and virtual machines each use a unique serializer for interfaces, however both are named InterfaceSerializer.

@jeremystretch commented on GitHub (Jul 18, 2018): My guess is drf-yasg is caching the serializer definition internally by name. Devices and virtual machines each use a unique serializer for interfaces, however both are named `InterfaceSerializer`.
Author
Owner

@lampwins commented on GitHub (Dec 11, 2018):

This will be covered in #2665

@lampwins commented on GitHub (Dec 11, 2018): This will be covered in #2665
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1706