-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: backlogAwaiting selection for workAwaiting selection for worktype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
Triage priority
I volunteer to perform this work (if approved)
NetBox Version
v4.1.6
Python Version
3.10
Steps to Reproduce
GET /api/dcim/device-types/
{
"count": 2424,
"next": "https://netbox.com/api/dcim/device-types/?limit=50&offset=50",
"previous": null,
"results": [
{
"id": 1112,
"url": "https://netbox.com/api/dcim/device-types/1112/",
"display_url": "https://netbox.com/dcim/device-types/1112/",
"display": "Thunder 4440 ADC",
"manufacturer": {
"id": 47,
"url": "https://netbox.com/api/dcim/manufacturers/47/",
"display": "A10",
"name": "A10",
"slug": "a10",
"description": ""
},
"default_platform": null,
"model": "Thunder 4440 ADC",
"slug": "a10-thunder-4440-adc",
"part_number": "TH4440",
"u_height": 1.0,
"exclude_from_utilization": false,
"is_full_depth": true,
"subdevice_role": null,
"airflow": null,
"weight": null,
"weight_unit": null,
"front_image": null,
"rear_image": null,
"description": "",
"comments": "[A10 Thunder 4440 Applcation Delivery Controller Datasheet](https://www.a10networks.com/wp-content/uploads/A10-DS-Thunder-ADC.pdf)",
"tags": [],
"custom_fields": {},
"created": "2024-10-28T06:49:53.123905-04:00",
"last_updated": "2024-10-28T06:49:53.123918-04:00",
"device_count": 0,
"console_port_template_count": 0,
"console_server_port_template_count": 0,
"power_port_template_count": 0,
"power_outlet_template_count": 0,
"interface_template_count": 8,
"front_port_template_count": 0,
"rear_port_template_count": 0,
"device_bay_template_count": 0,
"module_bay_template_count": 0,
"inventory_item_template_count": 0
}
]
}Note "devicetype_count" is missing.
Expected Behavior
The expected response, according to the OpenAPI specification for Netbox:
GET /api/dcim/device-types/
{
"count": 2424,
"next": "https://netbox.com/api/dcim/device-types/?limit=50&offset=50",
"previous": null,
"results": [
{
"id": 1112,
"url": "https://netbox.com/api/dcim/device-types/1112/",
"display_url": "https://netbox.com/dcim/device-types/1112/",
"display": "Thunder 4440 ADC",
"manufacturer": {
"id": 47,
"url": "https://netbox.com/api/dcim/manufacturers/47/",
"display": "A10",
"name": "A10",
"slug": "a10",
"description": "",
"devicetype_count": 1
},
"default_platform": null,
"model": "Thunder 4440 ADC",
"slug": "a10-thunder-4440-adc",
"part_number": "TH4440",
"u_height": 1.0,
"exclude_from_utilization": false,
"is_full_depth": true,
"subdevice_role": null,
"airflow": null,
"weight": null,
"weight_unit": null,
"front_image": null,
"rear_image": null,
"description": "",
"comments": "[A10 Thunder 4440 Applcation Delivery Controller Datasheet](https://www.a10networks.com/wp-content/uploads/A10-DS-Thunder-ADC.pdf)",
"tags": [],
"custom_fields": {},
"created": "2024-10-28T06:49:53.123905-04:00",
"last_updated": "2024-10-28T06:49:53.123918-04:00",
"device_count": 0,
"console_port_template_count": 0,
"console_server_port_template_count": 0,
"power_port_template_count": 0,
"power_outlet_template_count": 0,
"interface_template_count": 8,
"front_port_template_count": 0,
"rear_port_template_count": 0,
"device_bay_template_count": 0,
"module_bay_template_count": 0,
"inventory_item_template_count": 0
}
]
}Observed Behavior
According to the OpenAPI specification BriefManufacturer has a required field of "devicetype_count". However, when querying DeviceTypes and ModuleTypes, the field is not populated and causes SDKs using the OpenAPI generator, to fail.
Go-Netbox Creating Manufacture errors out because of missing required property devicetype_count #165
jasonbarbee, riptidewave93, arossbell, mylesgrindon, yan0s and 3 moreriptidewave93, kendallzhu and n-rodriguez
Metadata
Metadata
Assignees
Labels
netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: backlogAwaiting selection for workAwaiting selection for worktype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application