For WritableVlan group attribute is marked as required #7212

Closed
opened 2025-12-29 20:20:31 +01:00 by adam · 3 comments
Owner

Originally created by @amhn on GitHub (Nov 9, 2022).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.3.7

Python version

3.10

Steps to Reproduce

Look at swagger.json. Required field for WritableVlan:

          "required" : [ 
              "group",
              "vid",
              "name"
            ],

Run the following POST request.

curl \
-H "Authorization: Token $NETBOX_TOKEN"\
-H "Content-type: application/json"\
http://localhost:8000/api/ipam/vlans/ -X POST -d "{\"vid\":53,\"name\":\"test\"}"

Expected Behavior

According to swagger.json group is a required parameter. So this request should fail.

Observed Behavior

Vlan is created.

This is actually the desired result. group should be dropped from the required parameters.

Originally created by @amhn on GitHub (Nov 9, 2022). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.3.7 ### Python version 3.10 ### Steps to Reproduce Look at swagger.json. Required field for WritableVlan: ``` "required" : [ "group", "vid", "name" ], ``` Run the following POST request. ``` curl \ -H "Authorization: Token $NETBOX_TOKEN"\ -H "Content-type: application/json"\ http://localhost:8000/api/ipam/vlans/ -X POST -d "{\"vid\":53,\"name\":\"test\"}" ``` ### Expected Behavior According to swagger.json `group` is a required parameter. So this request should fail. ### Observed Behavior Vlan is created. This is actually the desired result. `group` should be dropped from the required parameters.
adam added the type: bugstatus: needs owner labels 2025-12-29 20:20:31 +01:00
adam closed this issue 2025-12-29 20:20:31 +01:00
Author
Owner

@amhn commented on GitHub (Nov 9, 2022):

Same problem for group parameter of WritableContact. I can open another bug once this one is validated.

@amhn commented on GitHub (Nov 9, 2022): Same problem for group parameter of WritableContact. I can open another bug once this one is validated.
Author
Owner

@jeremystretch commented on GitHub (Nov 18, 2022):

I believe this is a bug in the inspector relating to the use of unique_together on the model. It's been resolved in the v3.4 beta branch, where we've replaced unique_together with UniqueConstraints globally.

@jeremystretch commented on GitHub (Nov 18, 2022): I believe this is a bug in the inspector relating to the use of `unique_together` on the model. It's been resolved in the v3.4 beta branch, where we've replaced `unique_together` with UniqueConstraints globally.
Author
Owner

@amhn commented on GitHub (Nov 18, 2022):

Just looked at the API docs for 3.4 and it is fixed there.

Thank you.

@amhn commented on GitHub (Nov 18, 2022): Just looked at the API docs for 3.4 and it is fixed there. Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7212