netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.15k stars 2.58k forks source link

API Documentation is Missing dns_name__empty for /ipam/ip-addresses #11151

Closed Spaceman1701 closed 1 year ago

Spaceman1701 commented 1 year ago

NetBox version

v3.3.9

Python version

3.8

Steps to Reproduce

  1. view /ipam/ip-address in the swagger REST API docs and notice that dns_name__empty is listed as a parameter
  2. make an HTTP GET to /api/ipam/ip-addresses/?dns_name__empty=0 and /api/ipam/ip-addresses/?dns_name__emtpy=1 and observe that the query parameter has the desired effect

Expected Behavior

The /ipam/ip-addresses endpoint should list the dns_name__empty query parameter in the Swagger API Docs

Observed Behavior

The Swagger API docs are missing the dns_name__emtpy query parameter for GET /ipam/ip-addresses in the Swagger docs. The actual API still seems to honor this parameter. I've observed this in Netbox 3.3.9.

This is easy to observe on the demo instance: https://demo.netbox.dev/api/ipam/ip-addresses/?dns_name__empty=1 https://demo.netbox.dev/api/ipam/ip-addresses/?dns_name__empty=0

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

fabi125 commented 1 year ago

We have some automation around the auto-generated api documentation and this is causing some issues for us. Could someone point me in the right direction on what might have caused this? I'm happy to take a stab at fixing it.

kkthxbye-code commented 1 year ago

I tested on v3.3.9 and v3.4.0 and this seems to have been fixed. In v3.3.9 dns_name__empty is missing and in v3.4.0+:

image.