Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Keyhaku opened this issue Apr 27, 2018 · 3 comments · Fixed by #2957
Closed

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

Keyhaku opened this issue Apr 27, 2018 · 3 comments · Fixed by #2957
Labels
status: accepted This issue has been accepted for implementation status: blocked Another issue or external requirement is preventing implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@Keyhaku
Copy link

Keyhaku commented 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.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application help wanted status: accepted This issue has been accepted for implementation labels May 22, 2018
@k-nishigaki
Copy link

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

I hope to modified documentation.

@jeremystretch
Copy link
Member

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.

@netbox-community netbox-community deleted a comment from FrantisekLee Aug 1, 2018
@lampwins lampwins added the status: blocked Another issue or external requirement is preventing implementation label Dec 11, 2018
@lampwins
Copy link
Contributor

This will be covered in #2665

axnsan12 added a commit to axnsan12/netbox that referenced this issue Mar 4, 2019
This solves the problem of distinct serializers being confused because they have the same class name (e.g. `InterfaceSerializer`)

Fixes netbox-community#2065.
jeremystretch added a commit that referenced this issue Mar 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation status: blocked Another issue or external requirement is preventing implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants