-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullable fields not nullable in the OpenAPI spec #15588
Comments
My guess would be that this comes from the primary_ip being a property, making it read only but not nullable. But I'm not sure whether thats in the right direction. I'd be open to fixing this but will need some pointers |
Please spend some more time on your report. Without an explicit list of fields which you believe to be erroneously defined, this is not actionable. |
Sorry, I've updated the issue description to list the fields I identified. I think we can identify all fields impacted when we understand what is causing the spec for these to be wrong |
Deployment Type
Self-hosted
NetBox Version
v3.7.4
Python Version
3.11
Steps to Reproduce
Compare the API spec on dcim/devices to the actual API response
Expected Behavior
An unknown number of fields should be marked nullable in the openapi spec
This include at least:
primary_ip
onVirtualMachineWithConfigContext
primary_ip
onDeviceWithConfigContext
I think there are more as I expect this an issue with how the spec is generated from properties
Observed Behavior
compared to the spec:
Note how primary_ipv4 is marked nullable, as expected
The above is just one instance, it happens to other schemas as well. E.g.
DeviceWithConfigContext
has the same problemThe text was updated successfully, but these errors were encountered: