Swagger API Browser No Longer Filters By Endpoint #2226

Closed
opened 2025-12-29 17:23:54 +01:00 by adam · 5 comments
Owner

Originally created by @bdlamprecht on GitHub (Dec 18, 2018).

Environment

  • Python version: 3.6.5
  • NetBox version: v2.5.1

Steps to Reproduce

Browse to /api/docs/ and attempt to filter on dcim.
The only filter that functions now is api which is not very helpful as they all being with api

See screenshot below from v2.5.1.

With no filter applied:
image

Attempting to filter on dcim:
image

Versus the previous behavior on v2.4.8:

With no filter applied:
image

Filtering on dcim:
image

Expected Behavior

It should correctly filter on the named endpoints.

Observed Behavior

Endpoints are no longer filterable.

Originally created by @bdlamprecht on GitHub (Dec 18, 2018). ### Environment * Python version: 3.6.5 * NetBox version: v2.5.1 ### Steps to Reproduce Browse to `/api/docs/` and attempt to filter on `dcim`. The only filter that functions now is `api` which is not very helpful as they **_all_** being with `api` See screenshot below from `v2.5.1`. With no filter applied: ![image](https://user-images.githubusercontent.com/7783306/50170612-88d88600-02ad-11e9-8788-a5768ea7cc60.png) Attempting to filter on `dcim`: ![image](https://user-images.githubusercontent.com/7783306/50170663-aad20880-02ad-11e9-8a90-4fd2e3925512.png) Versus the previous behavior on `v2.4.8`: With no filter applied: ![image](https://user-images.githubusercontent.com/7783306/50170740-d94fe380-02ad-11e9-9e17-e7d55298f6a1.png) Filtering on `dcim`: ![image](https://user-images.githubusercontent.com/7783306/50170781-f389c180-02ad-11e9-886f-dc3de80baead.png) ### Expected Behavior It should correctly filter on the named endpoints. ### Observed Behavior Endpoints are no longer filterable.
adam added the type: bugstatus: accepted labels 2025-12-29 17:23:54 +01:00
adam closed this issue 2025-12-29 17:23:55 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 19, 2018):

Swagger has been rife with problems since it was introduced. We're soon replacing it with either the DRF built-in docs (#2665) or custom code. If you want to submit a PR for a short-term fix I'll leave this open. Otherwise, I don't think we're going to expend any more effort on Swagger unless it's a critical bug.

@jeremystretch commented on GitHub (Dec 19, 2018): Swagger has been rife with problems since it was introduced. We're soon replacing it with either the DRF built-in docs (#2665) or custom code. If you want to submit a PR for a short-term fix I'll leave this open. Otherwise, I don't think we're going to expend any more effort on Swagger unless it's a critical bug.
Author
Owner

@bdlamprecht commented on GitHub (Dec 19, 2018):

Is there a rough timeframe for when DRF will be implemented (or custom-code)?

If it is going to take a month to implement either of those, I'll be okay with that, but if it turns out to be 2+ months, this is a big enough deal to me to investigate fixing it and submit a PR.

So, back to my original when on when this could be expected (such as v2.5.5 or v2.6.X)?

@bdlamprecht commented on GitHub (Dec 19, 2018): Is there a _**rough**_ timeframe for when DRF will be implemented (or custom-code)? If it is going to take a month to implement either of those, I'll be okay with that, but if it turns out to be 2+ months, this is a big enough deal to me to investigate fixing it and submit a PR. So, back to my original when on _when_ this *could* be expected (such as `v2.5.5` or v`2.6.X`)?
Author
Owner

@jeremystretch commented on GitHub (Feb 26, 2019):

Fixed this by excluding the root API view from Swagger UI.

@jeremystretch commented on GitHub (Feb 26, 2019): Fixed this by excluding the root API view from Swagger UI.
Author
Owner

@bdlamprecht commented on GitHub (Feb 27, 2019):

That appears to have been a simple fix, thanks!

@bdlamprecht commented on GitHub (Feb 27, 2019): That appears to have been a simple fix, thanks!
Author
Owner

@jeremystretch commented on GitHub (Feb 27, 2019):

Yeah, it was a pleasant surprise. :)

@jeremystretch commented on GitHub (Feb 27, 2019): Yeah, it was a pleasant surprise. :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2226