Skip to content

parent_device on Device is not marked as nullable in swagger api docs #16624

Closed
@fabi125

Description

@fabi125

Deployment Type

Self-hosted

NetBox Version

v4.0.5

Python Version

3.10

Steps to Reproduce

  1. Go to https://demo.netbox.dev/api/schema/swagger-ui/
  2. Scroll down to Device Schema and look at the parent_device field

Expected Behavior

It should contain an annotation nullable: true.

Observed Behavior

It does not contain that annotation.

The fix for this should be to add allow_null=True to SerializerMethodField here:

parent_device = serializers.SerializerMethodField()

Happy to put up a PR but it might be easier for a maintainer to just make the change and directly merge it.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtopic: OpenAPItype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions