Swagger UI generating incorrect schemas for /users/users/ endpoint #11752

Closed
opened 2025-12-29 21:49:27 +01:00 by adam · 3 comments
Owner

Originally created by @bctiemann on GitHub (Oct 20, 2025).

Originally assigned to: @jnovinger on GitHub.

NetBox Edition

NetBox Community

NetBox Version

v4.4.4

Python Version

3.10

Steps to Reproduce

Make a POST or PUT request to /users/users/

Expected Behavior

POST: swagger suggests this only accepts a single object

PUT: swagger suggests this is a single object

Observed Behavior

POST: Endpoint permits either a single object or a list

PUT: Posting to a single object yields "id is a required field" - but this isn't documented within the swagger documentation

Originally created by @bctiemann on GitHub (Oct 20, 2025). Originally assigned to: @jnovinger on GitHub. ### NetBox Edition NetBox Community ### NetBox Version v4.4.4 ### Python Version 3.10 ### Steps to Reproduce Make a POST or PUT request to `/users/users/` ### Expected Behavior POST: swagger suggests this only accepts a single object PUT: swagger suggests this is a single object ### Observed Behavior POST: Endpoint permits either a single object or a list PUT: Posting to a single object yields "id is a required field" - but this isn't documented within the swagger documentation
adam added the type: bugstatus: acceptednetboxseverity: lowtopic: OpenAPI labels 2025-12-29 21:49:27 +01:00
adam closed this issue 2025-12-29 21:49:27 +01:00
Author
Owner

@bctiemann commented on GitHub (Oct 20, 2025):

Would be good to get some further data as to whether this behavior is unique to the /users/users/ endpoint or is common to other/all REST endpoints.

@bctiemann commented on GitHub (Oct 20, 2025): Would be good to get some further data as to whether this behavior is unique to the `/users/users/` endpoint or is common to other/all REST endpoints.
Author
Owner

@cruse1977 commented on GitHub (Oct 28, 2025):

@jnovinger on this, I can't be sure but I believe this does impact other endpoints from past interactions

@cruse1977 commented on GitHub (Oct 28, 2025): @jnovinger on this, I can't be sure but I believe this does impact other endpoints from past interactions
Author
Owner

@jnovinger commented on GitHub (Oct 28, 2025):

@jnovinger on this, I can't be sure but I believe this does impact other endpoints from past interactions

Agreed, that's matches my impression from a first look.

@jnovinger commented on GitHub (Oct 28, 2025): > [@jnovinger](https://github.com/jnovinger) on this, I can't be sure but I believe this does impact other endpoints from past interactions Agreed, that's matches my impression from a first look.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11752