From 6505ee5a8182412132c76da24ed2d21de5fa0213 Mon Sep 17 00:00:00 2001 From: Joey Berkovitz Date: Mon, 20 Mar 2023 09:52:30 -0400 Subject: [PATCH] fix rack facility_id --- netbox/models/writable_rack.go | 2 +- preprocess.py | 2 +- swagger.processed.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/netbox/models/writable_rack.go b/netbox/models/writable_rack.go index 10ce0989e4..9853d27996 100644 --- a/netbox/models/writable_rack.go +++ b/netbox/models/writable_rack.go @@ -72,7 +72,7 @@ type WritableRack struct { // Facility ID // Max Length: 50 - FacilityID *string `json:"facility_id,omitempty"` + FacilityID *string `json:"facility_id"` // ID // Read Only: true diff --git a/preprocess.py b/preprocess.py index f0efcbe760..e37fd9fa97 100755 --- a/preprocess.py +++ b/preprocess.py @@ -101,7 +101,7 @@ ): prop_spec["x-omitempty"] = False logging.info(f"set x-omitempty = false on WritableRack.{prop}") - if prop in ["tags", "type", "outer_unit", "weight_unit", "asset_tag", "desc_units"]: + if prop in ["tags", "type", "outer_unit", "weight_unit", "asset_tag", "desc_units", "facility_id"]: prop_spec["x-omitempty"] = False logging.info(f"set x-omitempty = false on WritableRack.{prop}") diff --git a/swagger.processed.json b/swagger.processed.json index 5f37d3845f..f1a6b7b2a2 100644 --- a/swagger.processed.json +++ b/swagger.processed.json @@ -86029,7 +86029,8 @@ "title": "Facility ID", "type": "string", "maxLength": 50, - "x-nullable": true + "x-nullable": true, + "x-omitempty": false }, "site": { "title": "Site",