Skip to content

Address warnings from generation of OpenAPI schema #20787

@jeremystretch

Description

@jeremystretch

Proposed Changes

After upgrading to drf-spectacular v0.29.0, generating the OpenAPI schema now yields several hundred warnings similar to those below:

netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tag" in model. Defaulting to string.
netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tag_id" in model. Defaulting to string.
netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tenant" in model. Defaulting to string.
netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tag__n" in model. Defaulting to string.
netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tag_id__n" in model. Defaulting to string.
netbox/netbox/wireless/filtersets.py:90: Warning [WirelessLinkViewSet > WirelessLinkFilterSet]: Unable to guess choice types from values, filter method's type hint or find "tenant__n" in model. Defaulting to string.

Justification

These warnings likely indicate that the generated schema may not be accurate.

Metadata

Metadata

Assignees

Labels

netboxstatus: acceptedThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end user

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions