Warning on schema generation for IPAddressField #7917

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

Originally created by @arthanson on GitHub (Apr 17, 2023).

Originally assigned to: @arthanson on GitHub.

Proposed Changes

Should silence warning for IPAddressField on drf-spectacular openAPI 3.

Generate schema using, e.g.

./netbox/manage.py spectacular --color --file schema.json --validate --format openapi-json

Warning [IPRangeViewSet > IPRangeSerializer]: model field "IPAddressField" has no mapping in ModelSerializer. It may be a deprecated field. Defaulting to "string"

Justification

There should be no warnings produced by default if possible.

Originally created by @arthanson on GitHub (Apr 17, 2023). Originally assigned to: @arthanson on GitHub. ### Proposed Changes Should silence warning for IPAddressField on drf-spectacular openAPI 3. Generate schema using, e.g. ``` ./netbox/manage.py spectacular --color --file schema.json --validate --format openapi-json ``` Warning [IPRangeViewSet > IPRangeSerializer]: model field "IPAddressField" has no mapping in ModelSerializer. It may be a deprecated field. Defaulting to "string" ### Justification There should be no warnings produced by default if possible.
adam added the type: bugstatus: acceptedtype: housekeepingbeta labels 2025-12-29 20:29:57 +01:00
adam closed this issue 2025-12-29 20:29:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7917