diff --git a/contrib/openapi.json b/contrib/openapi.json index 14eba1d6e..d0a486f97 100644 --- a/contrib/openapi.json +++ b/contrib/openapi.json @@ -199947,7 +199947,7 @@ "schemas": { "ASN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -199994,6 +199994,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -200044,7 +200052,7 @@ }, "ASNRange": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -200100,6 +200108,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -200144,7 +200160,7 @@ }, "ASNRangeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -200199,6 +200215,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -200220,7 +200252,7 @@ }, "ASNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "asn": { "type": "integer", @@ -200265,6 +200297,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -200285,7 +200333,7 @@ }, "Aggregate": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -200350,6 +200398,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -200390,7 +200446,7 @@ }, "AggregateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -200431,6 +200487,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -200865,7 +200937,7 @@ }, "BriefCable": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -200897,7 +200969,7 @@ }, "BriefCableRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "label": { "type": "string", @@ -200911,7 +200983,7 @@ }, "BriefCircuit": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -200950,7 +201022,7 @@ }, "BriefCircuitGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -201064,7 +201136,7 @@ }, "BriefCircuitGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -201078,7 +201150,7 @@ }, "BriefCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -201109,7 +201181,7 @@ }, "BriefCircuitType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -201154,7 +201226,7 @@ }, "BriefCircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -201179,7 +201251,7 @@ }, "BriefCluster": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201218,7 +201290,7 @@ }, "BriefClusterGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -201263,7 +201335,7 @@ }, "BriefClusterGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -201288,7 +201360,7 @@ }, "BriefClusterRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -201306,7 +201378,7 @@ }, "BriefClusterType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -201351,7 +201423,7 @@ }, "BriefClusterTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -201376,7 +201448,7 @@ }, "BriefConfigContextProfile": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201409,7 +201481,7 @@ }, "BriefConfigContextProfileRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -201427,7 +201499,7 @@ }, "BriefConfigTemplate": { "type": "object", - "description": "Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment\non create() and update().", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -201460,7 +201532,7 @@ }, "BriefConfigTemplateRequest": { "type": "object", - "description": "Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment\non create() and update().", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -201478,7 +201550,7 @@ }, "BriefContact": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201511,7 +201583,7 @@ }, "BriefContactRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -201529,7 +201601,7 @@ }, "BriefContactRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -201568,7 +201640,7 @@ }, "BriefContactRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -201593,7 +201665,7 @@ }, "BriefCustomFieldChoiceSet": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -201631,7 +201703,7 @@ }, "BriefCustomFieldChoiceSetRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -201679,7 +201751,7 @@ }, "BriefDataSource": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201712,7 +201784,7 @@ }, "BriefDataSourceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -201730,7 +201802,7 @@ }, "BriefDevice": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201763,7 +201835,7 @@ }, "BriefDeviceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -201778,7 +201850,7 @@ }, "BriefDeviceRole": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -201835,7 +201907,7 @@ }, "BriefDeviceRoleRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -201860,7 +201932,7 @@ }, "BriefDeviceType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201909,7 +201981,7 @@ }, "BriefDeviceTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -201945,7 +202017,7 @@ }, "BriefFHRPGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -201994,7 +202066,7 @@ }, "BriefFHRPGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "protocol": { "enum": [ @@ -202027,7 +202099,7 @@ }, "BriefIKEPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202060,7 +202132,7 @@ }, "BriefIKEPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -202078,7 +202150,7 @@ }, "BriefIPAddress": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202133,7 +202205,7 @@ }, "BriefIPAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "address": { "type": "string", @@ -202150,7 +202222,7 @@ }, "BriefIPSecPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202183,7 +202255,7 @@ }, "BriefIPSecPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -202201,7 +202273,7 @@ }, "BriefIPSecProfile": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202234,7 +202306,7 @@ }, "BriefIPSecProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -202334,7 +202406,7 @@ }, "BriefInventoryItemRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -202379,7 +202451,7 @@ }, "BriefInventoryItemRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -202478,7 +202550,7 @@ }, "BriefL2VPN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202569,7 +202641,7 @@ }, "BriefL2VPNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "identifier": { "type": "integer", @@ -202669,7 +202741,7 @@ }, "BriefLocation": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -202720,7 +202792,7 @@ }, "BriefLocationRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -202745,7 +202817,7 @@ }, "BriefMACAddress": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202777,7 +202849,7 @@ }, "BriefMACAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "mac_address": { "type": "string", @@ -202794,7 +202866,7 @@ }, "BriefManufacturer": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -202839,7 +202911,7 @@ }, "BriefManufacturerRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -202864,7 +202936,7 @@ }, "BriefModule": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202896,7 +202968,7 @@ }, "BriefModuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "device": { "oneOf": [ @@ -202919,7 +202991,7 @@ }, "BriefModuleType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202964,7 +203036,7 @@ }, "BriefModuleTypeProfile": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -202997,7 +203069,7 @@ }, "BriefModuleTypeProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203015,7 +203087,7 @@ }, "BriefModuleTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "profile": { "oneOf": [ @@ -203058,9 +203130,60 @@ "model" ] }, + "BriefOwner": { + "type": "object", + "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "url": { + "type": "string", + "format": "uri", + "readOnly": true + }, + "display": { + "type": "string", + "readOnly": true + }, + "name": { + "type": "string", + "maxLength": 150 + }, + "description": { + "type": "string", + "maxLength": 200 + } + }, + "required": [ + "display", + "id", + "name", + "url" + ] + }, + "BriefOwnerRequest": { + "type": "object", + "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 150 + }, + "description": { + "type": "string", + "maxLength": 200 + } + }, + "required": [ + "name" + ] + }, "BriefPlatform": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -203117,7 +203240,7 @@ }, "BriefPlatformRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -203142,7 +203265,7 @@ }, "BriefPowerPanel": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203181,7 +203304,7 @@ }, "BriefPowerPanelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203334,7 +203457,7 @@ }, "BriefProvider": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203380,7 +203503,7 @@ }, "BriefProviderAccount": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203419,7 +203542,7 @@ }, "BriefProviderAccountRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203443,7 +203566,7 @@ }, "BriefProviderNetwork": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203476,7 +203599,7 @@ }, "BriefProviderNetworkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203494,7 +203617,7 @@ }, "BriefProviderRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203520,7 +203643,7 @@ }, "BriefRIR": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -203565,7 +203688,7 @@ }, "BriefRIRRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -203590,7 +203713,7 @@ }, "BriefRack": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203629,7 +203752,7 @@ }, "BriefRackRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -203647,7 +203770,7 @@ }, "BriefRackRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -203692,7 +203815,7 @@ }, "BriefRackRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -203717,7 +203840,7 @@ }, "BriefRackType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -203760,7 +203883,7 @@ }, "BriefRackTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -203849,7 +203972,7 @@ }, "BriefRegion": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -203900,7 +204023,7 @@ }, "BriefRegionRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -203925,7 +204048,7 @@ }, "BriefRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -203976,7 +204099,7 @@ }, "BriefRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -204001,7 +204124,7 @@ }, "BriefSite": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204041,7 +204164,7 @@ }, "BriefSiteGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -204092,7 +204215,7 @@ }, "BriefSiteGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -204117,7 +204240,7 @@ }, "BriefSiteRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204143,7 +204266,7 @@ }, "BriefTag": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -204187,7 +204310,7 @@ }, "BriefTenant": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204226,7 +204349,7 @@ }, "BriefTenantGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -204277,7 +204400,7 @@ }, "BriefTenantGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -204302,7 +204425,7 @@ }, "BriefTenantRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204327,7 +204450,7 @@ }, "BriefTunnel": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204360,7 +204483,7 @@ }, "BriefTunnelGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -204405,7 +204528,7 @@ }, "BriefTunnelGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -204430,7 +204553,7 @@ }, "BriefTunnelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204495,7 +204618,7 @@ }, "BriefVLAN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204536,7 +204659,7 @@ }, "BriefVLANGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -204581,7 +204704,7 @@ }, "BriefVLANGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -204606,7 +204729,7 @@ }, "BriefVLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "vid": { "type": "integer", @@ -204632,7 +204755,7 @@ }, "BriefVLANTranslationPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204665,7 +204788,7 @@ }, "BriefVLANTranslationPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204683,7 +204806,7 @@ }, "BriefVRF": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204729,7 +204852,7 @@ }, "BriefVRFRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204754,7 +204877,7 @@ }, "BriefVirtualChassis": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204800,7 +204923,7 @@ }, "BriefVirtualChassisRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -204826,7 +204949,7 @@ }, "BriefVirtualCircuit": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204865,7 +204988,7 @@ }, "BriefVirtualCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -204896,7 +205019,7 @@ }, "BriefVirtualCircuitType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -204941,7 +205064,7 @@ }, "BriefVirtualCircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -204966,7 +205089,7 @@ }, "BriefVirtualMachine": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -204999,7 +205122,7 @@ }, "BriefVirtualMachineRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -205017,7 +205140,7 @@ }, "BriefWirelessLANGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -205068,7 +205191,7 @@ }, "BriefWirelessLANGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -205093,7 +205216,7 @@ }, "Cable": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -205244,6 +205367,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -205281,7 +205412,7 @@ }, "CableRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "type": { "enum": [ @@ -205393,6 +205524,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -205480,7 +205627,7 @@ }, "Circuit": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -205636,6 +205783,14 @@ "readOnly": true, "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -205793,7 +205948,7 @@ }, "CircuitGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -205834,6 +205989,14 @@ ], "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206020,7 +206183,7 @@ }, "CircuitGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -206053,6 +206216,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206071,7 +206250,7 @@ }, "CircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -206192,6 +206371,22 @@ "x-spec-enum-id": "53542e7902f946af", "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -206456,7 +206651,7 @@ }, "CircuitType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -206494,6 +206689,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206536,7 +206739,7 @@ }, "CircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -206558,6 +206761,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206576,7 +206795,7 @@ }, "Cluster": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -206662,6 +206881,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -206734,7 +206961,7 @@ }, "ClusterGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -206767,6 +206994,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206809,7 +207044,7 @@ }, "ClusterGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -206826,6 +207061,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -206844,7 +207095,7 @@ }, "ClusterRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -206917,6 +207168,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -206938,7 +207205,7 @@ }, "ClusterType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -206971,6 +207238,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -207013,7 +207288,7 @@ }, "ClusterTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -207030,6 +207305,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -207048,7 +207339,7 @@ }, "ConfigContext": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -207164,6 +207455,14 @@ "$ref": "#/components/schemas/Tenant" } }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -207223,7 +207522,7 @@ }, "ConfigContextProfile": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -207258,9 +207557,17 @@ "tags": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/NestedTag" } }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -207315,7 +207622,7 @@ }, "ConfigContextProfileRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -207333,10 +207640,25 @@ "tags": { "type": "array", "items": { - "type": "string", - "minLength": 1 + "$ref": "#/components/schemas/NestedTagRequest" } }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -207357,7 +207679,7 @@ }, "ConfigContextRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -207464,6 +207786,22 @@ "type": "integer" } }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -207490,7 +207828,7 @@ }, "ConfigTemplate": { "type": "object", - "description": "Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment\non create() and update().", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -207564,6 +207902,14 @@ "nullable": true, "title": "Date synced" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -207598,7 +207944,7 @@ }, "ConfigTemplateRequest": { "type": "object", - "description": "Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment\non create() and update().", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -207648,6 +207994,22 @@ } ] }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -208700,7 +209062,7 @@ }, "Contact": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -208756,6 +209118,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -208965,7 +209335,7 @@ }, "ContactGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -209033,6 +209403,14 @@ "readOnly": true, "default": 0 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -209057,7 +209435,7 @@ }, "ContactGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -209092,6 +209470,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -209103,7 +209497,7 @@ }, "ContactRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "groups": { "type": "array", @@ -209142,6 +209536,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -209162,7 +209572,7 @@ }, "ContactRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -209195,6 +209605,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -209231,7 +209649,7 @@ }, "ContactRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -209248,6 +209666,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -209266,7 +209700,7 @@ }, "CustomField": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -209501,6 +209935,14 @@ ], "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -209532,7 +209974,7 @@ }, "CustomFieldChoiceSet": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -209600,6 +210042,14 @@ "type": "integer", "readOnly": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "created": { "type": "string", "format": "date-time", @@ -209627,7 +210077,7 @@ }, "CustomFieldChoiceSetRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -209660,6 +210110,22 @@ "order_alphabetically": { "type": "boolean", "description": "Choices are automatically ordered alphabetically" + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } }, "required": [ @@ -209669,7 +210135,7 @@ }, "CustomFieldRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -209829,6 +210295,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -209841,7 +210323,7 @@ }, "CustomLink": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -209918,6 +210400,14 @@ "type": "boolean", "description": "Force link to open in a new window" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "created": { "type": "string", "format": "date-time", @@ -209946,7 +210436,7 @@ }, "CustomLinkRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -210007,6 +210497,22 @@ "new_window": { "type": "boolean", "description": "Force link to open in a new window" + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } }, "required": [ @@ -210094,7 +210600,7 @@ }, "DataSource": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -210206,6 +210712,14 @@ "type": "string", "description": "Patterns (one per line) matching files to ignore when syncing" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -210254,7 +210768,7 @@ }, "DataSourceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -210308,6 +210822,22 @@ "type": "string", "description": "Patterns (one per line) matching files to ignore when syncing" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -210324,7 +210854,7 @@ }, "Device": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -210597,6 +211127,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -210933,7 +211471,7 @@ }, "DeviceRole": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -211023,6 +211561,14 @@ "readOnly": true, "default": 0 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -211048,7 +211594,7 @@ }, "DeviceRoleRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -211109,6 +211655,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -211120,7 +211682,7 @@ }, "DeviceType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -211297,6 +211859,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -211393,7 +211963,7 @@ }, "DeviceTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -211523,6 +212093,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -211545,7 +212131,7 @@ }, "DeviceWithConfigContext": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -211927,7 +212513,7 @@ }, "DeviceWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -212250,7 +212836,7 @@ }, "EventRule": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -212351,6 +212937,14 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -212387,7 +212981,7 @@ }, "EventRuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -212453,6 +213047,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -212470,7 +213080,7 @@ }, "ExportTemplate": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -212555,6 +213165,14 @@ "nullable": true, "title": "Date synced" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "created": { "type": "string", "format": "date-time", @@ -212585,7 +213203,7 @@ }, "ExportTemplateRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -212640,6 +213258,22 @@ "$ref": "#/components/schemas/BriefDataSourceRequest" } ] + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } }, "required": [ @@ -212650,7 +213284,7 @@ }, "FHRPGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -212715,6 +213349,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -212862,7 +213504,7 @@ }, "FHRPGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -212909,6 +213551,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -213880,7 +214538,7 @@ }, "IKEPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -213960,6 +214618,14 @@ "type": "string", "title": "Pre-shared key" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -213999,7 +214665,7 @@ }, "IKEPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -214038,6 +214704,22 @@ "type": "string", "title": "Pre-shared key" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214059,7 +214741,7 @@ }, "IKEProposal": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -214244,6 +214926,14 @@ "nullable": true, "description": "Security association lifetime (in seconds)" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214285,7 +214975,7 @@ }, "IKEProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -214372,6 +215062,22 @@ "nullable": true, "description": "Security association lifetime (in seconds)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214395,7 +215101,7 @@ }, "IPAddress": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -214557,6 +215263,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214598,7 +215312,7 @@ }, "IPAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "address": { "type": "string", @@ -214693,6 +215407,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214713,7 +215443,7 @@ }, "IPRange": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -214816,6 +215546,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214865,7 +215603,7 @@ }, "IPRangeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "start_address": { "type": "string", @@ -214937,6 +215675,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -214966,7 +215720,7 @@ }, "IPSecPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -215065,6 +215819,14 @@ } } }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -215103,7 +215865,7 @@ }, "IPSecPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -215151,6 +215913,22 @@ "description": "* `1` - Group 1\n* `2` - Group 2\n* `5` - Group 5\n* `14` - Group 14\n* `15` - Group 15\n* `16` - Group 16\n* `17` - Group 17\n* `18` - Group 18\n* `19` - Group 19\n* `20` - Group 20\n* `21` - Group 21\n* `22` - Group 22\n* `23` - Group 23\n* `24` - Group 24\n* `25` - Group 25\n* `26` - Group 26\n* `27` - Group 27\n* `28` - Group 28\n* `29` - Group 29\n* `30` - Group 30\n* `31` - Group 31\n* `32` - Group 32\n* `33` - Group 33\n* `34` - Group 34", "x-spec-enum-id": "dbef43be795462a8" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -215171,7 +215949,7 @@ }, "IPSecProfile": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -215226,6 +216004,14 @@ "ipsec_policy": { "$ref": "#/components/schemas/BriefIPSecPolicy" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -215267,7 +216053,7 @@ }, "IPSecProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -215307,6 +216093,22 @@ } ] }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -215330,7 +216132,7 @@ }, "IPSecProposal": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -215434,6 +216236,14 @@ "title": "SA lifetime (KB)", "description": "Security association lifetime (in kilobytes)" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -215472,7 +216282,7 @@ }, "IPSecProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -215526,6 +216336,22 @@ "title": "SA lifetime (KB)", "description": "Security association lifetime (in kilobytes)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -218900,7 +219726,7 @@ }, "InventoryItemRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -218938,6 +219764,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -218980,7 +219814,7 @@ }, "InventoryItemRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -219003,6 +219837,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -219495,7 +220345,7 @@ }, "L2VPN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -219615,6 +220465,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -219662,7 +220520,7 @@ }, "L2VPNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "identifier": { "type": "integer", @@ -219729,6 +220587,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -219880,7 +220754,7 @@ }, "Location": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -220001,6 +220875,14 @@ "format": "int64", "readOnly": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -220028,7 +220910,7 @@ }, "LocationRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -220106,6 +220988,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -220118,7 +221016,7 @@ }, "MACAddress": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -220160,6 +221058,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -220199,7 +221105,7 @@ }, "MACAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "mac_address": { "type": "string", @@ -220220,6 +221126,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -220240,7 +221162,7 @@ }, "Manufacturer": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -220273,6 +221195,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -220327,7 +221257,7 @@ }, "ManufacturerRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -220344,6 +221274,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -220362,7 +221308,7 @@ }, "Module": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -220435,6 +221381,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -220784,7 +221738,7 @@ }, "ModuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "device": { "oneOf": [ @@ -220837,6 +221791,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -220859,7 +221829,7 @@ }, "ModuleType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -220975,6 +221945,14 @@ "attributes": { "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -221014,7 +221992,7 @@ }, "ModuleTypeProfile": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -221045,6 +222023,14 @@ "schema": { "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -221083,7 +222069,7 @@ }, "ModuleTypeProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -221097,6 +222083,22 @@ "schema": { "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -221117,7 +222119,7 @@ }, "ModuleTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "profile": { "oneOf": [ @@ -221201,6 +222203,22 @@ "attributes": { "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -226996,7 +228014,7 @@ }, "PatchedASNRangeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227051,6 +228069,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227065,7 +228099,7 @@ }, "PatchedASNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "asn": { "type": "integer", @@ -227110,6 +228144,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -227152,7 +228202,7 @@ }, "PatchedCircuitGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227185,6 +228235,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227279,7 +228345,7 @@ }, "PatchedCircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227301,6 +228367,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227315,7 +228397,7 @@ }, "PatchedClusterGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227332,6 +228414,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227346,7 +228444,7 @@ }, "PatchedClusterTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227363,6 +228461,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227377,7 +228491,7 @@ }, "PatchedConfigContextProfileRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -227395,10 +228509,25 @@ "tags": { "type": "array", "items": { - "type": "string", - "minLength": 1 + "$ref": "#/components/schemas/NestedTagRequest" } }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -227416,7 +228545,7 @@ }, "PatchedConfigContextRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -227523,6 +228652,22 @@ "type": "integer" } }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227545,7 +228690,7 @@ }, "PatchedConfigTemplateRequest": { "type": "object", - "description": "Introduces support for Tag assignment. Adds `tags` serialization, and handles tag assignment\non create() and update().", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -227595,6 +228740,22 @@ } ] }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227605,7 +228766,7 @@ }, "PatchedContactRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "groups": { "type": "array", @@ -227644,6 +228805,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -227661,7 +228838,7 @@ }, "PatchedContactRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -227678,6 +228855,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -227692,7 +228885,7 @@ }, "PatchedCustomLinkRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -227753,6 +228946,22 @@ "new_window": { "type": "boolean", "description": "Force link to open in a new window" + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } } }, @@ -227852,7 +229061,7 @@ }, "PatchedExportTemplateRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -227907,6 +229116,22 @@ "$ref": "#/components/schemas/BriefDataSourceRequest" } ] + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } } }, @@ -227942,7 +229167,7 @@ }, "PatchedFHRPGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -227989,6 +229214,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228054,7 +229295,7 @@ }, "PatchedInventoryItemRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -228077,6 +229318,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -228209,7 +229466,7 @@ }, "PatchedMACAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "mac_address": { "type": "string", @@ -228230,6 +229487,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228247,7 +229520,7 @@ }, "PatchedManufacturerRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -228264,6 +229537,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -228413,7 +229702,7 @@ }, "PatchedModuleTypeProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -228427,6 +229716,22 @@ "schema": { "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228592,7 +229897,7 @@ }, "PatchedPowerPanelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "site": { "oneOf": [ @@ -228629,6 +229934,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228646,7 +229967,7 @@ }, "PatchedProviderAccountRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "provider": { "oneOf": [ @@ -228673,6 +229994,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228690,7 +230027,7 @@ }, "PatchedProviderNetworkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "provider": { "oneOf": [ @@ -228715,6 +230052,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228732,7 +230085,7 @@ }, "PatchedProviderRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -228756,6 +230109,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228779,7 +230148,7 @@ }, "PatchedRIRRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -228801,6 +230170,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -228815,7 +230200,7 @@ }, "PatchedRackRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -228838,6 +230223,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -228852,7 +230253,7 @@ }, "PatchedRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -228874,6 +230275,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -228888,7 +230305,7 @@ }, "PatchedRouteTargetRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -228916,6 +230333,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -228933,7 +230366,7 @@ }, "PatchedSavedFilterRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -228971,7 +230404,23 @@ "shared": { "type": "boolean" }, - "parameters": {} + "parameters": {}, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + } } }, "PatchedScriptInputRequest": { @@ -229074,7 +230523,7 @@ }, "PatchedTagRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -229112,7 +230561,7 @@ }, "PatchedTenantRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -229145,6 +230594,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -229218,7 +230683,7 @@ }, "PatchedTunnelGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -229235,6 +230700,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -229308,7 +230789,7 @@ }, "PatchedVLANGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -229355,6 +230836,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -229369,7 +230866,7 @@ }, "PatchedVLANTranslationPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -229379,6 +230876,25 @@ "description": { "type": "string", "maxLength": 200 + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, + "comments": { + "type": "string" } } }, @@ -229411,7 +230927,7 @@ }, "PatchedVRFRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -229450,6 +230966,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -229479,7 +231011,7 @@ }, "PatchedVirtualCircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -229501,6 +231033,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -229556,7 +231104,7 @@ }, "PatchedWebhookRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -229619,6 +231167,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -229629,7 +231193,7 @@ }, "PatchedWritableAggregateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -229670,6 +231234,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -229687,7 +231267,7 @@ }, "PatchedWritableCableRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "type": { "enum": [ @@ -229799,6 +231379,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -229861,7 +231457,7 @@ }, "PatchedWritableCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -229982,6 +231578,22 @@ "x-spec-enum-id": "53542e7902f946af", "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -230005,7 +231617,7 @@ }, "PatchedWritableClusterRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -230078,6 +231690,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -230524,7 +232152,7 @@ }, "PatchedWritableContactGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -230555,6 +232183,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -230562,7 +232206,7 @@ }, "PatchedWritableCustomFieldChoiceSetRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -230598,12 +232242,28 @@ "order_alphabetically": { "type": "boolean", "description": "Choices are automatically ordered alphabetically" + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } } }, "PatchedWritableCustomFieldRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -230763,6 +232423,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -230770,7 +232446,7 @@ }, "PatchedWritableDataSourceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -230819,6 +232495,22 @@ "type": "string", "description": "Patterns (one per line) matching files to ignore when syncing" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -230830,7 +232522,7 @@ }, "PatchedWritableDeviceRoleRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -230887,6 +232579,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -230894,7 +232602,7 @@ }, "PatchedWritableDeviceTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -231025,6 +232733,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -231042,7 +232766,7 @@ }, "PatchedWritableDeviceWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -231365,7 +233089,7 @@ }, "PatchedWritableEventRuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -231431,6 +233155,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -231718,7 +233458,7 @@ }, "PatchedWritableIKEPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -231762,6 +233502,22 @@ "type": "string", "title": "Pre-shared key" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -231779,7 +233535,7 @@ }, "PatchedWritableIKEProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -231871,6 +233627,22 @@ "nullable": true, "description": "Security association lifetime (in seconds)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -231888,7 +233660,7 @@ }, "PatchedWritableIPAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "address": { "type": "string", @@ -231983,6 +233755,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -232000,7 +233788,7 @@ }, "PatchedWritableIPRangeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "start_address": { "type": "string", @@ -232072,6 +233860,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -232097,7 +233901,7 @@ }, "PatchedWritableIPSecPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -232149,6 +233953,22 @@ "minimum": 0, "maximum": 32767 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -232166,7 +233986,7 @@ }, "PatchedWritableIPSecProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -232206,6 +234026,22 @@ } ] }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -232223,7 +234059,7 @@ }, "PatchedWritableIPSecProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -232285,6 +234121,22 @@ "title": "SA lifetime (KB)", "description": "Security association lifetime (in kilobytes)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -233505,7 +235357,7 @@ }, "PatchedWritableL2VPNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "identifier": { "type": "integer", @@ -233572,6 +235424,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -233605,7 +235473,7 @@ }, "PatchedWritableLocationRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -233679,6 +235547,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -233686,7 +235570,7 @@ }, "PatchedWritableModuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "device": { "oneOf": [ @@ -233739,6 +235623,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -233756,7 +235656,7 @@ }, "PatchedWritableModuleTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "profile": { "oneOf": [ @@ -233840,6 +235740,22 @@ "attributes": { "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -233857,7 +235773,7 @@ }, "PatchedWritablePlatformRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "parent": { "type": "integer", @@ -233910,6 +235826,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -233927,7 +235859,7 @@ }, "PatchedWritablePowerFeedRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "power_panel": { "oneOf": [ @@ -234038,6 +235970,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -234830,7 +236778,7 @@ }, "PatchedWritablePrefixRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -234932,6 +236880,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -234949,7 +236913,7 @@ }, "PatchedWritableRackRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -235192,6 +237156,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -235209,7 +237189,7 @@ }, "PatchedWritableRackReservationRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "rack": { "oneOf": [ @@ -235270,6 +237250,22 @@ "minLength": 1, "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -235287,7 +237283,7 @@ }, "PatchedWritableRackTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -235429,6 +237425,22 @@ "nullable": true, "description": "Maximum depth of a mounted device, in millimeters. For four-post racks, this is the distance between the front and rear rails." }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -235710,7 +237722,7 @@ }, "PatchedWritableRegionRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -235741,6 +237753,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -235748,7 +237776,7 @@ }, "PatchedWritableServiceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "parent_object_type": { "type": "string" @@ -235793,6 +237821,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -235810,7 +237854,7 @@ }, "PatchedWritableServiceTemplateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -235840,6 +237884,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -235857,7 +237917,7 @@ }, "PatchedWritableSiteGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -235888,6 +237948,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -235895,7 +237971,7 @@ }, "PatchedWritableSiteRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -236013,6 +238089,22 @@ "nullable": true, "description": "GPS coordinate in decimal format (xx.yyyyyy)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236036,7 +238128,7 @@ }, "PatchedWritableTenantGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -236067,6 +238159,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -236074,7 +238182,7 @@ }, "PatchedWritableTunnelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -236165,6 +238273,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236244,7 +238368,7 @@ }, "PatchedWritableVLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "site": { "oneOf": [ @@ -236353,6 +238477,22 @@ "type": "integer", "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236524,7 +238664,7 @@ }, "PatchedWritableVirtualChassisRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -236543,6 +238683,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236560,7 +238716,7 @@ }, "PatchedWritableVirtualCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -236638,6 +238794,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236705,7 +238877,7 @@ }, "PatchedWritableVirtualDeviceContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -236790,6 +238962,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -236807,7 +238995,7 @@ }, "PatchedWritableVirtualMachineWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -237024,7 +239212,7 @@ }, "PatchedWritableWirelessLANGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -237055,6 +239243,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -237062,7 +239266,7 @@ }, "PatchedWritableWirelessLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "ssid": { "type": "string", @@ -237174,6 +239378,22 @@ "title": "Pre-shared key", "maxLength": 64 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -237191,7 +239411,7 @@ }, "PatchedWritableWirelessLinkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "interface_a": { "oneOf": [ @@ -237304,6 +239524,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -237321,7 +239557,7 @@ }, "Platform": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -237378,6 +239614,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -237435,7 +239679,7 @@ }, "PlatformRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "parent": { "allOf": [ @@ -237492,6 +239736,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -237513,7 +239773,7 @@ }, "PowerFeed": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -237707,6 +239967,14 @@ ], "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -237759,7 +240027,7 @@ }, "PowerFeedRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "power_panel": { "oneOf": [ @@ -237870,6 +240138,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -239039,7 +241323,7 @@ }, "PowerPanel": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -239078,6 +241362,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -239123,7 +241415,7 @@ }, "PowerPanelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "site": { "oneOf": [ @@ -239160,6 +241452,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240252,7 +242560,7 @@ }, "Prefix": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -240379,6 +242687,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240430,7 +242746,7 @@ }, "PrefixRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -240532,6 +242848,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240552,7 +242884,7 @@ }, "Provider": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -240592,6 +242924,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240643,7 +242983,7 @@ }, "ProviderAccount": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -240680,6 +243020,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240719,7 +243067,7 @@ }, "ProviderAccountRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "provider": { "oneOf": [ @@ -240746,6 +243094,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240767,7 +243131,7 @@ }, "ProviderNetwork": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -240802,6 +243166,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240841,7 +243213,7 @@ }, "ProviderNetworkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "provider": { "oneOf": [ @@ -240866,6 +243238,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240887,7 +243275,7 @@ }, "ProviderRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -240911,6 +243299,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -240938,7 +243342,7 @@ }, "RIR": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -240976,6 +243380,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -241018,7 +243430,7 @@ }, "RIRRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -241040,6 +243452,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -241058,7 +243486,7 @@ }, "Rack": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -241359,6 +243787,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -241410,7 +243846,7 @@ }, "RackRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -241649,6 +244085,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -241670,7 +244122,7 @@ }, "RackReservation": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -241751,6 +244203,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -241780,7 +244240,7 @@ }, "RackReservationRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "rack": { "oneOf": [ @@ -241841,6 +244301,22 @@ "minLength": 1, "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -241864,7 +244340,7 @@ }, "RackRole": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -241902,6 +244378,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -241944,7 +244428,7 @@ }, "RackRoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -241967,6 +244451,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -241985,7 +244485,7 @@ }, "RackType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -242194,6 +244694,14 @@ "nullable": true, "description": "Maximum depth of a mounted device, in millimeters. For four-post racks, this is the distance between the front and rear rails." }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -242234,7 +244742,7 @@ }, "RackTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -242377,6 +244885,22 @@ "nullable": true, "description": "Maximum depth of a mounted device, in millimeters. For four-post racks, this is the distance between the front and rear rails." }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -243213,7 +245737,7 @@ }, "Region": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -243286,6 +245810,14 @@ "format": "int64", "readOnly": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -243311,7 +245843,7 @@ }, "RegionRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -243346,6 +245878,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -243357,7 +245905,7 @@ }, "Role": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -243395,6 +245943,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -243443,7 +245999,7 @@ }, "RoleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -243465,6 +246021,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -243483,7 +246055,7 @@ }, "RouteTarget": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -243520,6 +246092,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -243558,7 +246138,7 @@ }, "RouteTargetRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -243586,6 +246166,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -243606,7 +246202,7 @@ }, "SavedFilter": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -243661,6 +246257,14 @@ "type": "boolean" }, "parameters": {}, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "created": { "type": "string", "format": "date-time", @@ -243689,7 +246293,7 @@ }, "SavedFilterRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -243727,7 +246331,23 @@ "shared": { "type": "boolean" }, - "parameters": {} + "parameters": {}, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + } }, "required": [ "name", @@ -243825,7 +246445,7 @@ }, "Service": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -243904,6 +246524,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -243946,7 +246574,7 @@ }, "ServiceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "parent_object_type": { "type": "string" @@ -243991,6 +246619,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244014,7 +246658,7 @@ }, "ServiceTemplate": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -244074,6 +246718,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244113,7 +246765,7 @@ }, "ServiceTemplateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -244143,6 +246795,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244164,7 +246832,7 @@ }, "Site": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -244288,6 +246956,14 @@ "nullable": true, "description": "GPS coordinate in decimal format (xx.yyyyyy)" }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244369,7 +247045,7 @@ }, "SiteGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -244442,6 +247118,14 @@ "format": "int64", "readOnly": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244467,7 +247151,7 @@ }, "SiteGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -244502,6 +247186,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -244513,7 +247213,7 @@ }, "SiteRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -244631,6 +247331,22 @@ "nullable": true, "description": "GPS coordinate in decimal format (xx.yyyyyy)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -244892,7 +247608,7 @@ }, "Tag": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -244973,7 +247689,7 @@ }, "TagRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -245062,7 +247778,7 @@ }, "Tenant": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -245103,6 +247819,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -245202,7 +247926,7 @@ }, "TenantGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -245270,6 +247994,14 @@ "readOnly": true, "default": 0 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -245294,7 +248026,7 @@ }, "TenantGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -245329,6 +248061,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -245340,7 +248088,7 @@ }, "TenantRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -245373,6 +248121,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -245670,7 +248434,7 @@ }, "Tunnel": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -245785,6 +248549,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -245831,7 +248603,7 @@ }, "TunnelGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -245864,6 +248636,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -245906,7 +248686,7 @@ }, "TunnelGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -245923,6 +248703,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -245941,7 +248737,7 @@ }, "TunnelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -246032,6 +248828,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -246367,7 +249179,7 @@ }, "VLAN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -246488,6 +249300,14 @@ ], "nullable": true }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -246543,7 +249363,7 @@ }, "VLANGroup": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -246602,6 +249422,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -246650,7 +249478,7 @@ }, "VLANGroupRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -246697,6 +249525,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -246715,7 +249559,7 @@ }, "VLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "site": { "oneOf": [ @@ -246826,6 +249670,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -246847,7 +249707,7 @@ }, "VLANTranslationPolicy": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -246876,6 +249736,17 @@ "$ref": "#/components/schemas/VLANTranslationRule" }, "readOnly": true + }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, + "comments": { + "type": "string" } }, "required": [ @@ -246888,7 +249759,7 @@ }, "VLANTranslationPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -246898,6 +249769,25 @@ "description": { "type": "string", "maxLength": 200 + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, + "comments": { + "type": "string" } }, "required": [ @@ -247347,7 +250237,7 @@ }, "VRF": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -247395,6 +250285,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -247457,7 +250355,7 @@ }, "VRFRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -247496,6 +250394,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -247528,7 +250442,7 @@ }, "VirtualChassis": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -247568,6 +250482,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -247619,7 +250541,7 @@ }, "VirtualChassisRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -247642,6 +250564,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -247662,7 +250600,7 @@ }, "VirtualCircuit": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -247743,6 +250681,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -247783,7 +250729,7 @@ }, "VirtualCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -247861,6 +250807,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -248026,7 +250988,7 @@ }, "VirtualCircuitType": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "id": { "type": "integer", @@ -248064,6 +251026,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -248106,7 +251076,7 @@ }, "VirtualCircuitTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from OrganizationalModel.", "properties": { "name": { "type": "string", @@ -248128,6 +251098,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -248146,7 +251132,7 @@ }, "VirtualDeviceContext": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -248239,6 +251225,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -248286,7 +251280,7 @@ }, "VirtualDeviceContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -248371,6 +251365,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -248513,7 +251523,7 @@ }, "VirtualMachineWithConfigContext": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -248738,7 +251748,7 @@ }, "VirtualMachineWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -248958,7 +251968,7 @@ }, "Webhook": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "id": { "type": "integer", @@ -249036,6 +252046,14 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -249068,7 +252086,7 @@ }, "WebhookRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -249131,6 +252149,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -249145,7 +252179,7 @@ }, "WirelessLAN": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -249290,6 +252324,14 @@ "title": "Pre-shared key", "maxLength": 64 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249329,7 +252371,7 @@ }, "WirelessLANGroup": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "id": { "type": "integer", @@ -249397,6 +252439,14 @@ "readOnly": true, "default": 0 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249421,7 +252471,7 @@ }, "WirelessLANGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -249456,6 +252506,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -249467,7 +252533,7 @@ }, "WirelessLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "ssid": { "type": "string", @@ -249574,6 +252640,22 @@ "title": "Pre-shared key", "maxLength": 64 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249594,7 +252676,7 @@ }, "WirelessLink": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "id": { "type": "integer", @@ -249751,6 +252833,14 @@ "type": "string", "maxLength": 200 }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwner" + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249790,7 +252880,7 @@ }, "WirelessLinkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "interface_a": { "oneOf": [ @@ -249897,6 +252987,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249918,7 +253024,7 @@ }, "WritableAggregateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -249959,6 +253065,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -249980,7 +253102,7 @@ }, "WritableCableRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "type": { "enum": [ @@ -250092,6 +253214,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -250159,7 +253297,7 @@ }, "WritableCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -250280,6 +253418,22 @@ "x-spec-enum-id": "53542e7902f946af", "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -250308,7 +253462,7 @@ }, "WritableClusterRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -250381,6 +253535,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -250850,7 +254020,7 @@ }, "WritableContactGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -250881,6 +254051,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -250892,7 +254078,7 @@ }, "WritableCustomFieldChoiceSetRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "name": { "type": "string", @@ -250928,6 +254114,22 @@ "order_alphabetically": { "type": "boolean", "description": "Choices are automatically ordered alphabetically" + }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true } }, "required": [ @@ -250937,7 +254139,7 @@ }, "WritableCustomFieldRequest": { "type": "object", - "description": "Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during\nvalidation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -251097,6 +254299,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -251108,7 +254326,7 @@ }, "WritableDataSourceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -251157,6 +254375,22 @@ "type": "string", "description": "Patterns (one per line) matching files to ignore when syncing" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -251173,7 +254407,7 @@ }, "WritableDeviceRoleRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -251230,6 +254464,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -251241,7 +254491,7 @@ }, "WritableDeviceTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -251372,6 +254622,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -251394,7 +254660,7 @@ }, "WritableDeviceWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -251722,7 +254988,7 @@ }, "WritableEventRuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Adds an `owner` field for models which have a ForeignKey to users.Owner.", "properties": { "object_types": { "type": "array", @@ -251788,6 +255054,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "tags": { "type": "array", "items": { @@ -252092,7 +255374,7 @@ }, "WritableIKEPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -252136,6 +255418,22 @@ "type": "string", "title": "Pre-shared key" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252156,7 +255454,7 @@ }, "WritableIKEProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -252248,6 +255546,22 @@ "nullable": true, "description": "Security association lifetime (in seconds)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252271,7 +255585,7 @@ }, "WritableIPAddressRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "address": { "type": "string", @@ -252366,6 +255680,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252386,7 +255716,7 @@ }, "WritableIPRangeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "start_address": { "type": "string", @@ -252458,6 +255788,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252487,7 +255833,7 @@ }, "WritableIPSecPolicyRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -252539,6 +255885,22 @@ "minimum": 0, "maximum": 32767 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252559,7 +255921,7 @@ }, "WritableIPSecProfileRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -252599,6 +255961,22 @@ } ] }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -252622,7 +256000,7 @@ }, "WritableIPSecProposalRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -252684,6 +256062,22 @@ "title": "SA lifetime (KB)", "description": "Security association lifetime (in kilobytes)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -253925,7 +257319,7 @@ }, "WritableL2VPNRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "identifier": { "type": "integer", @@ -253992,6 +257386,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -254030,7 +257440,7 @@ }, "WritableLocationRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -254104,6 +257514,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -254116,7 +257542,7 @@ }, "WritableModuleRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "device": { "oneOf": [ @@ -254169,6 +257595,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -254191,7 +257633,7 @@ }, "WritableModuleTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "profile": { "oneOf": [ @@ -254275,6 +257717,22 @@ "attributes": { "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -254296,7 +257754,7 @@ }, "WritablePlatformRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "parent": { "type": "integer", @@ -254349,6 +257807,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -254370,7 +257844,7 @@ }, "WritablePowerFeedRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "power_panel": { "oneOf": [ @@ -254481,6 +257955,22 @@ ], "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -255291,7 +258781,7 @@ }, "WritablePrefixRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "prefix": { "type": "string", @@ -255393,6 +258883,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -255413,7 +258919,7 @@ }, "WritableRackRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -255656,6 +259162,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -255677,7 +259199,7 @@ }, "WritableRackReservationRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "rack": { "oneOf": [ @@ -255738,6 +259260,22 @@ "minLength": 1, "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -255761,7 +259299,7 @@ }, "WritableRackTypeRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "manufacturer": { "oneOf": [ @@ -255903,6 +259441,22 @@ "nullable": true, "description": "Maximum depth of a mounted device, in millimeters. For four-post racks, this is the distance between the front and rear rails." }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -256199,7 +259753,7 @@ }, "WritableRegionRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -256230,6 +259784,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -256241,7 +259811,7 @@ }, "WritableServiceRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "parent_object_type": { "type": "string" @@ -256286,6 +259856,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -256310,7 +259896,7 @@ }, "WritableServiceTemplateRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -256340,6 +259926,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -256362,7 +259964,7 @@ }, "WritableSiteGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -256393,6 +259995,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -256404,7 +260022,7 @@ }, "WritableSiteRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -256522,6 +260140,22 @@ "nullable": true, "description": "GPS coordinate in decimal format (xx.yyyyyy)" }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -256549,7 +260183,7 @@ }, "WritableTenantGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -256580,6 +260214,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -256591,7 +260241,7 @@ }, "WritableTunnelRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -256682,6 +260332,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -256769,7 +260435,7 @@ }, "WritableVLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "site": { "oneOf": [ @@ -256878,6 +260544,22 @@ "type": "integer", "nullable": true }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -257057,7 +260739,7 @@ }, "WritableVirtualChassisRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -257076,6 +260758,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -257096,7 +260794,7 @@ }, "WritableVirtualCircuitRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "cid": { "type": "string", @@ -257174,6 +260872,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -257250,7 +260964,7 @@ }, "WritableVirtualDeviceContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -257335,6 +261049,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -257357,7 +261087,7 @@ }, "WritableVirtualMachineWithConfigContextRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "name": { "type": "string", @@ -257577,7 +261307,7 @@ }, "WritableWirelessLANGroupRequest": { "type": "object", - "description": "Extends PrimaryModelSerializer to include MPTT support.", + "description": "Base serializer class for models inheriting from NestedGroupModel.", "properties": { "name": { "type": "string", @@ -257608,6 +261338,22 @@ "type": "object", "additionalProperties": {} }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" } @@ -257619,7 +261365,7 @@ }, "WritableWirelessLANRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "ssid": { "type": "string", @@ -257731,6 +261477,22 @@ "title": "Pre-shared key", "maxLength": 64 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, @@ -257751,7 +261513,7 @@ }, "WritableWirelessLinkRequest": { "type": "object", - "description": "Adds support for custom fields and tags.", + "description": "Base serializer class for models inheriting from PrimaryModel.", "properties": { "interface_a": { "oneOf": [ @@ -257864,6 +261626,22 @@ "type": "string", "maxLength": 200 }, + "owner": { + "oneOf": [ + { + "type": "integer" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/BriefOwnerRequest" + } + ], + "nullable": true + } + ], + "nullable": true + }, "comments": { "type": "string" }, diff --git a/netbox/circuits/api/serializers_/circuits.py b/netbox/circuits/api/serializers_/circuits.py index 70b57a688..bc84f66fa 100644 --- a/netbox/circuits/api/serializers_/circuits.py +++ b/netbox/circuits/api/serializers_/circuits.py @@ -11,7 +11,9 @@ from circuits.models import ( from dcim.api.serializers_.device_components import InterfaceSerializer from dcim.api.serializers_.cables import CabledObjectSerializer from netbox.api.fields import ChoiceField, ContentTypeField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer, WritableNestedSerializer +from netbox.api.serializers import ( + NetBoxModelSerializer, OrganizationalModelSerializer, PrimaryModelSerializer, WritableNestedSerializer, +) from netbox.choices import DistanceUnitChoices from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model @@ -29,7 +31,7 @@ __all__ = ( ) -class CircuitTypeSerializer(NetBoxModelSerializer): +class CircuitTypeSerializer(OrganizationalModelSerializer): # Related object counts circuit_count = RelatedObjectCountField('circuits') @@ -37,8 +39,8 @@ class CircuitTypeSerializer(NetBoxModelSerializer): class Meta: model = CircuitType fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'circuit_count', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'circuit_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'circuit_count') @@ -71,15 +73,15 @@ class CircuitCircuitTerminationSerializer(WritableNestedSerializer): return serializer(obj.termination, nested=True, context=context).data -class CircuitGroupSerializer(NetBoxModelSerializer): +class CircuitGroupSerializer(OrganizationalModelSerializer): tenant = TenantSerializer(nested=True, required=False, allow_null=True) circuit_count = RelatedObjectCountField('assignments') class Meta: model = CircuitGroup fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tenant', - 'tags', 'custom_fields', 'created', 'last_updated', 'circuit_count' + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tenant', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'circuit_count' ] brief_fields = ('id', 'url', 'display', 'name') @@ -99,7 +101,7 @@ class CircuitGroupAssignmentSerializer_(NetBoxModelSerializer): brief_fields = ('id', 'url', 'display', 'group', 'priority') -class CircuitSerializer(NetBoxModelSerializer): +class CircuitSerializer(PrimaryModelSerializer): provider = ProviderSerializer(nested=True) provider_account = ProviderAccountSerializer(nested=True, required=False, allow_null=True, default=None) status = ChoiceField(choices=CircuitStatusChoices, required=False) @@ -115,7 +117,7 @@ class CircuitSerializer(NetBoxModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'cid', 'provider', 'provider_account', 'type', 'status', 'tenant', 'install_date', 'termination_date', 'commit_rate', 'description', 'distance', 'distance_unit', - 'termination_a', 'termination_z', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'termination_a', 'termination_z', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'assignments', ] brief_fields = ('id', 'url', 'display', 'provider', 'cid', 'description') @@ -176,7 +178,7 @@ class CircuitGroupAssignmentSerializer(CircuitGroupAssignmentSerializer_): return serializer(obj.member, nested=True, context=context).data -class VirtualCircuitTypeSerializer(NetBoxModelSerializer): +class VirtualCircuitTypeSerializer(OrganizationalModelSerializer): # Related object counts virtual_circuit_count = RelatedObjectCountField('virtual_circuits') @@ -184,13 +186,13 @@ class VirtualCircuitTypeSerializer(NetBoxModelSerializer): class Meta: model = VirtualCircuitType fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'virtual_circuit_count', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'virtual_circuit_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'virtual_circuit_count') -class VirtualCircuitSerializer(NetBoxModelSerializer): +class VirtualCircuitSerializer(PrimaryModelSerializer): provider_network = ProviderNetworkSerializer(nested=True) provider_account = ProviderAccountSerializer(nested=True, required=False, allow_null=True, default=None) type = VirtualCircuitTypeSerializer(nested=True) @@ -201,7 +203,7 @@ class VirtualCircuitSerializer(NetBoxModelSerializer): model = VirtualCircuit fields = [ 'id', 'url', 'display_url', 'display', 'cid', 'provider_network', 'provider_account', 'type', 'status', - 'tenant', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'tenant', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'provider_network', 'cid', 'description') diff --git a/netbox/circuits/api/serializers_/providers.py b/netbox/circuits/api/serializers_/providers.py index 4e3787107..875c5c7f2 100644 --- a/netbox/circuits/api/serializers_/providers.py +++ b/netbox/circuits/api/serializers_/providers.py @@ -4,7 +4,7 @@ from circuits.models import Provider, ProviderAccount, ProviderNetwork from ipam.api.serializers_.asns import ASNSerializer from ipam.models import ASN from netbox.api.fields import RelatedObjectCountField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from .nested import NestedProviderAccountSerializer __all__ = ( @@ -14,7 +14,7 @@ __all__ = ( ) -class ProviderSerializer(NetBoxModelSerializer): +class ProviderSerializer(PrimaryModelSerializer): accounts = SerializedPKRelatedField( queryset=ProviderAccount.objects.all(), serializer=NestedProviderAccountSerializer, @@ -35,32 +35,32 @@ class ProviderSerializer(NetBoxModelSerializer): class Meta: model = Provider fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'accounts', 'description', 'comments', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'accounts', 'description', 'owner', 'comments', 'asns', 'tags', 'custom_fields', 'created', 'last_updated', 'circuit_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'circuit_count') -class ProviderAccountSerializer(NetBoxModelSerializer): +class ProviderAccountSerializer(PrimaryModelSerializer): provider = ProviderSerializer(nested=True) name = serializers.CharField(allow_blank=True, max_length=100, required=False, default='') class Meta: model = ProviderAccount fields = [ - 'id', 'url', 'display_url', 'display', 'provider', 'name', 'account', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'provider', 'name', 'account', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'account', 'description') -class ProviderNetworkSerializer(NetBoxModelSerializer): +class ProviderNetworkSerializer(PrimaryModelSerializer): provider = ProviderSerializer(nested=True) class Meta: model = ProviderNetwork fields = [ - 'id', 'url', 'display_url', 'display', 'provider', 'name', 'service_id', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'provider', 'name', 'service_id', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/core/api/serializers_/data.py b/netbox/core/api/serializers_/data.py index 3f2ddb2a0..3130b7472 100644 --- a/netbox/core/api/serializers_/data.py +++ b/netbox/core/api/serializers_/data.py @@ -1,7 +1,7 @@ from core.choices import * from core.models import DataFile, DataSource from netbox.api.fields import ChoiceField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, PrimaryModelSerializer from netbox.utils import get_data_backend_choices __all__ = ( @@ -10,7 +10,7 @@ __all__ = ( ) -class DataSourceSerializer(NetBoxModelSerializer): +class DataSourceSerializer(PrimaryModelSerializer): type = ChoiceField( choices=get_data_backend_choices() ) @@ -26,8 +26,8 @@ class DataSourceSerializer(NetBoxModelSerializer): model = DataSource fields = [ 'id', 'url', 'display_url', 'display', 'name', 'type', 'source_url', 'enabled', 'status', 'description', - 'sync_interval', 'parameters', 'ignore_rules', 'comments', 'custom_fields', 'created', 'last_updated', - 'last_synced', 'file_count', + 'sync_interval', 'parameters', 'ignore_rules', 'owner', 'comments', 'custom_fields', 'created', + 'last_updated', 'last_synced', 'file_count', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/dcim/api/serializers_/cables.py b/netbox/dcim/api/serializers_/cables.py index bb9a12462..d72b0cbec 100644 --- a/netbox/dcim/api/serializers_/cables.py +++ b/netbox/dcim/api/serializers_/cables.py @@ -5,7 +5,9 @@ from rest_framework import serializers from dcim.choices import * from dcim.models import Cable, CablePath, CableTermination from netbox.api.fields import ChoiceField, ContentTypeField -from netbox.api.serializers import BaseModelSerializer, GenericObjectSerializer, NetBoxModelSerializer +from netbox.api.serializers import ( + BaseModelSerializer, GenericObjectSerializer, NetBoxModelSerializer, PrimaryModelSerializer, +) from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model @@ -18,7 +20,7 @@ __all__ = ( ) -class CableSerializer(NetBoxModelSerializer): +class CableSerializer(PrimaryModelSerializer): a_terminations = GenericObjectSerializer(many=True, required=False) b_terminations = GenericObjectSerializer(many=True, required=False) status = ChoiceField(choices=LinkStatusChoices, required=False) @@ -29,8 +31,8 @@ class CableSerializer(NetBoxModelSerializer): model = Cable fields = [ 'id', 'url', 'display_url', 'display', 'type', 'a_terminations', 'b_terminations', 'status', 'tenant', - 'label', 'color', 'length', 'length_unit', 'description', 'comments', 'tags', 'custom_fields', 'created', - 'last_updated', + 'label', 'color', 'length', 'length_unit', 'description', 'owner', 'comments', 'tags', 'custom_fields', + 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'label', 'description') diff --git a/netbox/dcim/api/serializers_/devices.py b/netbox/dcim/api/serializers_/devices.py index c1e9c5f51..2a3e0cd42 100644 --- a/netbox/dcim/api/serializers_/devices.py +++ b/netbox/dcim/api/serializers_/devices.py @@ -11,15 +11,15 @@ from dcim.models import Device, DeviceBay, MACAddress, Module, VirtualDeviceCont from extras.api.serializers_.configtemplates import ConfigTemplateSerializer from ipam.api.serializers_.ip import IPAddressSerializer from netbox.api.fields import ChoiceField, ContentTypeField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from virtualization.api.serializers_.clusters import ClusterSerializer from .devicetypes import * +from .nested import NestedDeviceBaySerializer, NestedDeviceSerializer, NestedModuleBaySerializer from .platforms import PlatformSerializer from .racks import RackSerializer from .roles import DeviceRoleSerializer -from .nested import NestedDeviceBaySerializer, NestedDeviceSerializer, NestedModuleBaySerializer from .sites import LocationSerializer, SiteSerializer from .virtualchassis import VirtualChassisSerializer @@ -32,7 +32,7 @@ __all__ = ( ) -class DeviceSerializer(NetBoxModelSerializer): +class DeviceSerializer(PrimaryModelSerializer): device_type = DeviceTypeSerializer(nested=True) role = DeviceRoleSerializer(nested=True) tenant = TenantSerializer( @@ -84,8 +84,8 @@ class DeviceSerializer(NetBoxModelSerializer): 'id', 'url', 'display_url', 'display', 'name', 'device_type', 'role', 'tenant', 'platform', 'serial', 'asset_tag', 'site', 'location', 'rack', 'position', 'face', 'latitude', 'longitude', 'parent_device', 'status', 'airflow', 'primary_ip', 'primary_ip4', 'primary_ip6', 'oob_ip', 'cluster', 'virtual_chassis', - 'vc_position', 'vc_priority', 'description', 'comments', 'config_template', 'local_context_data', 'tags', - 'custom_fields', 'created', 'last_updated', 'console_port_count', 'console_server_port_count', + 'vc_position', 'vc_priority', 'description', 'owner', 'comments', 'config_template', 'local_context_data', + 'tags', 'custom_fields', 'created', 'last_updated', 'console_port_count', 'console_server_port_count', 'power_port_count', 'power_outlet_count', 'interface_count', 'front_port_count', 'rear_port_count', 'device_bay_count', 'module_bay_count', 'inventory_item_count', ] @@ -122,7 +122,7 @@ class DeviceWithConfigContextSerializer(DeviceSerializer): return obj.get_config_context() -class VirtualDeviceContextSerializer(NetBoxModelSerializer): +class VirtualDeviceContextSerializer(PrimaryModelSerializer): device = DeviceSerializer(nested=True) identifier = serializers.IntegerField(allow_null=True, max_value=32767, min_value=0, required=False, default=None) tenant = TenantSerializer(nested=True, required=False, allow_null=True, default=None) @@ -138,13 +138,13 @@ class VirtualDeviceContextSerializer(NetBoxModelSerializer): model = VirtualDeviceContext fields = [ 'id', 'url', 'display_url', 'display', 'name', 'device', 'identifier', 'tenant', 'primary_ip', - 'primary_ip4', 'primary_ip6', 'status', 'description', 'comments', 'tags', 'custom_fields', + 'primary_ip4', 'primary_ip6', 'status', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'interface_count', ] brief_fields = ('id', 'url', 'display', 'name', 'identifier', 'device', 'description') -class ModuleSerializer(NetBoxModelSerializer): +class ModuleSerializer(PrimaryModelSerializer): device = DeviceSerializer(nested=True) module_bay = NestedModuleBaySerializer() module_type = ModuleTypeSerializer(nested=True) @@ -154,12 +154,12 @@ class ModuleSerializer(NetBoxModelSerializer): model = Module fields = [ 'id', 'url', 'display_url', 'display', 'device', 'module_bay', 'module_type', 'status', 'serial', - 'asset_tag', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'asset_tag', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'device', 'module_bay', 'module_type', 'description') -class MACAddressSerializer(NetBoxModelSerializer): +class MACAddressSerializer(PrimaryModelSerializer): assigned_object_type = ContentTypeField( queryset=ContentType.objects.filter(MACADDRESS_ASSIGNMENT_MODELS), required=False, @@ -171,7 +171,7 @@ class MACAddressSerializer(NetBoxModelSerializer): model = MACAddress fields = [ 'id', 'url', 'display_url', 'display', 'mac_address', 'assigned_object_type', 'assigned_object_id', - 'assigned_object', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'assigned_object', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'mac_address', 'description') diff --git a/netbox/dcim/api/serializers_/devicetypes.py b/netbox/dcim/api/serializers_/devicetypes.py index 61e3833ec..59753847c 100644 --- a/netbox/dcim/api/serializers_/devicetypes.py +++ b/netbox/dcim/api/serializers_/devicetypes.py @@ -6,7 +6,7 @@ from rest_framework import serializers from dcim.choices import * from dcim.models import DeviceType, ModuleType, ModuleTypeProfile from netbox.api.fields import AttributesField, ChoiceField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from netbox.choices import * from .manufacturers import ManufacturerSerializer from .platforms import PlatformSerializer @@ -18,7 +18,7 @@ __all__ = ( ) -class DeviceTypeSerializer(NetBoxModelSerializer): +class DeviceTypeSerializer(PrimaryModelSerializer): manufacturer = ManufacturerSerializer(nested=True) default_platform = PlatformSerializer(nested=True, required=False, allow_null=True) u_height = serializers.DecimalField( @@ -54,7 +54,7 @@ class DeviceTypeSerializer(NetBoxModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'manufacturer', 'default_platform', 'model', 'slug', 'part_number', 'u_height', 'exclude_from_utilization', 'is_full_depth', 'subdevice_role', 'airflow', 'weight', - 'weight_unit', 'front_image', 'rear_image', 'description', 'comments', 'tags', 'custom_fields', + 'weight_unit', 'front_image', 'rear_image', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'device_count', 'console_port_template_count', 'console_server_port_template_count', 'power_port_template_count', 'power_outlet_template_count', 'interface_template_count', 'front_port_template_count', 'rear_port_template_count', @@ -63,18 +63,18 @@ class DeviceTypeSerializer(NetBoxModelSerializer): brief_fields = ('id', 'url', 'display', 'manufacturer', 'model', 'slug', 'description', 'device_count') -class ModuleTypeProfileSerializer(NetBoxModelSerializer): +class ModuleTypeProfileSerializer(PrimaryModelSerializer): class Meta: model = ModuleTypeProfile fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'description', 'schema', 'comments', 'tags', 'custom_fields', - 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'name', 'description', 'schema', 'owner', 'comments', 'tags', + 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') -class ModuleTypeSerializer(NetBoxModelSerializer): +class ModuleTypeSerializer(PrimaryModelSerializer): profile = ModuleTypeProfileSerializer( nested=True, required=False, @@ -105,7 +105,7 @@ class ModuleTypeSerializer(NetBoxModelSerializer): model = ModuleType fields = [ 'id', 'url', 'display_url', 'display', 'profile', 'manufacturer', 'model', 'part_number', 'airflow', - 'weight', 'weight_unit', 'description', 'attributes', 'comments', 'tags', 'custom_fields', 'created', - 'last_updated', + 'weight', 'weight_unit', 'description', 'attributes', 'owner', 'comments', 'tags', 'custom_fields', + 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'profile', 'manufacturer', 'model', 'description') diff --git a/netbox/dcim/api/serializers_/manufacturers.py b/netbox/dcim/api/serializers_/manufacturers.py index 1a1eea6ec..bd6581389 100644 --- a/netbox/dcim/api/serializers_/manufacturers.py +++ b/netbox/dcim/api/serializers_/manufacturers.py @@ -1,13 +1,13 @@ from dcim.models import Manufacturer from netbox.api.fields import RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import OrganizationalModelSerializer __all__ = ( 'ManufacturerSerializer', ) -class ManufacturerSerializer(NetBoxModelSerializer): +class ManufacturerSerializer(OrganizationalModelSerializer): # Related object counts devicetype_count = RelatedObjectCountField('device_types') @@ -17,7 +17,7 @@ class ManufacturerSerializer(NetBoxModelSerializer): class Meta: model = Manufacturer fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'devicetype_count', 'inventoryitem_count', 'platform_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'devicetype_count') diff --git a/netbox/dcim/api/serializers_/platforms.py b/netbox/dcim/api/serializers_/platforms.py index 08f8a64a8..c86bd9773 100644 --- a/netbox/dcim/api/serializers_/platforms.py +++ b/netbox/dcim/api/serializers_/platforms.py @@ -24,7 +24,7 @@ class PlatformSerializer(NestedGroupModelSerializer): model = Platform fields = [ 'id', 'url', 'display_url', 'display', 'parent', 'name', 'slug', 'manufacturer', 'config_template', - 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'device_count', + 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'device_count', 'virtualmachine_count', '_depth', ] brief_fields = ( diff --git a/netbox/dcim/api/serializers_/power.py b/netbox/dcim/api/serializers_/power.py index 4c2cf54fb..a9f83cdbe 100644 --- a/netbox/dcim/api/serializers_/power.py +++ b/netbox/dcim/api/serializers_/power.py @@ -1,7 +1,7 @@ from dcim.choices import * from dcim.models import PowerFeed, PowerPanel from netbox.api.fields import ChoiceField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from .base import ConnectedEndpointsSerializer from .cables import CabledObjectSerializer @@ -14,7 +14,7 @@ __all__ = ( ) -class PowerPanelSerializer(NetBoxModelSerializer): +class PowerPanelSerializer(PrimaryModelSerializer): site = SiteSerializer(nested=True) location = LocationSerializer( nested=True, @@ -29,13 +29,13 @@ class PowerPanelSerializer(NetBoxModelSerializer): class Meta: model = PowerPanel fields = [ - 'id', 'url', 'display_url', 'display', 'site', 'location', 'name', 'description', 'comments', 'tags', - 'custom_fields', 'powerfeed_count', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'site', 'location', 'name', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'powerfeed_count', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description', 'powerfeed_count') -class PowerFeedSerializer(NetBoxModelSerializer, CabledObjectSerializer, ConnectedEndpointsSerializer): +class PowerFeedSerializer(PrimaryModelSerializer, CabledObjectSerializer, ConnectedEndpointsSerializer): power_panel = PowerPanelSerializer(nested=True) rack = RackSerializer( nested=True, @@ -71,6 +71,7 @@ class PowerFeedSerializer(NetBoxModelSerializer, CabledObjectSerializer, Connect 'id', 'url', 'display_url', 'display', 'power_panel', 'rack', 'name', 'status', 'type', 'supply', 'phase', 'voltage', 'amperage', 'max_utilization', 'mark_connected', 'cable', 'cable_end', 'link_peers', 'link_peers_type', 'connected_endpoints', 'connected_endpoints_type', 'connected_endpoints_reachable', - 'description', 'tenant', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', '_occupied', + 'description', 'tenant', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + '_occupied', ] brief_fields = ('id', 'url', 'display', 'name', 'description', 'cable', '_occupied') diff --git a/netbox/dcim/api/serializers_/racks.py b/netbox/dcim/api/serializers_/racks.py index 9c2c739fe..ef06dc5aa 100644 --- a/netbox/dcim/api/serializers_/racks.py +++ b/netbox/dcim/api/serializers_/racks.py @@ -5,7 +5,7 @@ from dcim.choices import * from dcim.constants import * from dcim.models import Rack, RackReservation, RackRole, RackType from netbox.api.fields import ChoiceField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import OrganizationalModelSerializer, PrimaryModelSerializer from netbox.choices import * from netbox.config import ConfigItem from tenancy.api.serializers_.tenants import TenantSerializer @@ -22,7 +22,7 @@ __all__ = ( ) -class RackRoleSerializer(NetBoxModelSerializer): +class RackRoleSerializer(OrganizationalModelSerializer): # Related object counts rack_count = RelatedObjectCountField('racks') @@ -30,13 +30,13 @@ class RackRoleSerializer(NetBoxModelSerializer): class Meta: model = RackRole fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'rack_count', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'rack_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'rack_count') -class RackBaseSerializer(NetBoxModelSerializer): +class RackBaseSerializer(PrimaryModelSerializer): form_factor = ChoiceField( choices=RackFormFactorChoices, allow_blank=True, @@ -71,8 +71,8 @@ class RackTypeSerializer(RackBaseSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'manufacturer', 'model', 'slug', 'description', 'form_factor', 'width', 'u_height', 'starting_unit', 'desc_units', 'outer_width', 'outer_height', 'outer_depth', - 'outer_unit', 'weight', 'max_weight', 'weight_unit', 'mounting_depth', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'outer_unit', 'weight', 'max_weight', 'weight_unit', 'mounting_depth', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'manufacturer', 'model', 'slug', 'description') @@ -130,13 +130,13 @@ class RackSerializer(RackBaseSerializer): 'id', 'url', 'display_url', 'display', 'name', 'facility_id', 'site', 'location', 'tenant', 'status', 'role', 'serial', 'asset_tag', 'rack_type', 'form_factor', 'width', 'u_height', 'starting_unit', 'weight', 'max_weight', 'weight_unit', 'desc_units', 'outer_width', 'outer_height', 'outer_depth', 'outer_unit', - 'mounting_depth', 'airflow', 'description', 'comments', 'tags', 'custom_fields', - 'created', 'last_updated', 'device_count', 'powerfeed_count', + 'mounting_depth', 'airflow', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', + 'last_updated', 'device_count', 'powerfeed_count', ] brief_fields = ('id', 'url', 'display', 'name', 'description', 'device_count') -class RackReservationSerializer(NetBoxModelSerializer): +class RackReservationSerializer(PrimaryModelSerializer): rack = RackSerializer( nested=True, ) @@ -157,7 +157,7 @@ class RackReservationSerializer(NetBoxModelSerializer): model = RackReservation fields = [ 'id', 'url', 'display_url', 'display', 'rack', 'units', 'status', 'created', 'last_updated', 'user', - 'tenant', 'description', 'comments', 'tags', 'custom_fields', + 'tenant', 'description', 'owner', 'comments', 'tags', 'custom_fields', ] brief_fields = ('id', 'url', 'display', 'status', 'user', 'description', 'units') diff --git a/netbox/dcim/api/serializers_/roles.py b/netbox/dcim/api/serializers_/roles.py index 0f83655a6..83622899c 100644 --- a/netbox/dcim/api/serializers_/roles.py +++ b/netbox/dcim/api/serializers_/roles.py @@ -3,7 +3,7 @@ from rest_framework import serializers from dcim.models import DeviceRole, InventoryItemRole from extras.api.serializers_.configtemplates import ConfigTemplateSerializer from netbox.api.fields import RelatedObjectCountField -from netbox.api.serializers import NestedGroupModelSerializer, NetBoxModelSerializer +from netbox.api.serializers import NestedGroupModelSerializer, OrganizationalModelSerializer from .nested import NestedDeviceRoleSerializer __all__ = ( @@ -23,14 +23,14 @@ class DeviceRoleSerializer(NestedGroupModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'vm_role', 'config_template', 'parent', 'description', 'tags', 'custom_fields', 'created', 'last_updated', 'device_count', 'virtualmachine_count', - 'comments', '_depth', + 'owner', 'comments', '_depth', ] brief_fields = ( 'id', 'url', 'display', 'name', 'slug', 'description', 'device_count', 'virtualmachine_count', '_depth' ) -class InventoryItemRoleSerializer(NetBoxModelSerializer): +class InventoryItemRoleSerializer(OrganizationalModelSerializer): # Related object counts inventoryitem_count = RelatedObjectCountField('inventory_items') @@ -38,7 +38,7 @@ class InventoryItemRoleSerializer(NetBoxModelSerializer): class Meta: model = InventoryItemRole fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'inventoryitem_count', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'color', 'description', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'inventoryitem_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'inventoryitem_count') diff --git a/netbox/dcim/api/serializers_/sites.py b/netbox/dcim/api/serializers_/sites.py index 90f7b5d35..d0f632945 100644 --- a/netbox/dcim/api/serializers_/sites.py +++ b/netbox/dcim/api/serializers_/sites.py @@ -6,7 +6,7 @@ from dcim.models import Location, Region, Site, SiteGroup from ipam.api.serializers_.asns import ASNSerializer from ipam.models import ASN from netbox.api.fields import ChoiceField, RelatedObjectCountField, SerializedPKRelatedField -from netbox.api.serializers import NestedGroupModelSerializer, NetBoxModelSerializer +from netbox.api.serializers import NestedGroupModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from .nested import NestedLocationSerializer, NestedRegionSerializer, NestedSiteGroupSerializer @@ -27,7 +27,7 @@ class RegionSerializer(NestedGroupModelSerializer): model = Region fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'parent', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'site_count', 'prefix_count', 'comments', '_depth', + 'created', 'last_updated', 'site_count', 'prefix_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'site_count', '_depth') @@ -41,12 +41,12 @@ class SiteGroupSerializer(NestedGroupModelSerializer): model = SiteGroup fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'parent', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'site_count', 'prefix_count', 'comments', '_depth', + 'created', 'last_updated', 'site_count', 'prefix_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'site_count', '_depth') -class SiteSerializer(NetBoxModelSerializer): +class SiteSerializer(PrimaryModelSerializer): status = ChoiceField(choices=SiteStatusChoices, required=False) region = RegionSerializer(nested=True, required=False, allow_null=True) group = SiteGroupSerializer(nested=True, required=False, allow_null=True) @@ -72,7 +72,7 @@ class SiteSerializer(NetBoxModelSerializer): model = Site fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'status', 'region', 'group', 'tenant', 'facility', - 'time_zone', 'description', 'physical_address', 'shipping_address', 'latitude', 'longitude', + 'time_zone', 'description', 'physical_address', 'shipping_address', 'latitude', 'longitude', 'owner', 'comments', 'asns', 'tags', 'custom_fields', 'created', 'last_updated', 'circuit_count', 'device_count', 'prefix_count', 'rack_count', 'virtualmachine_count', 'vlan_count', ] @@ -93,6 +93,6 @@ class LocationSerializer(NestedGroupModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'site', 'parent', 'status', 'tenant', 'facility', 'description', 'tags', 'custom_fields', 'created', 'last_updated', 'rack_count', 'device_count', - 'prefix_count', 'comments', '_depth', + 'prefix_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'rack_count', '_depth') diff --git a/netbox/dcim/api/serializers_/virtualchassis.py b/netbox/dcim/api/serializers_/virtualchassis.py index a93d2833f..5e2ac7bec 100644 --- a/netbox/dcim/api/serializers_/virtualchassis.py +++ b/netbox/dcim/api/serializers_/virtualchassis.py @@ -1,7 +1,7 @@ from rest_framework import serializers from dcim.models import VirtualChassis -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from .nested import NestedDeviceSerializer __all__ = ( @@ -9,7 +9,7 @@ __all__ = ( ) -class VirtualChassisSerializer(NetBoxModelSerializer): +class VirtualChassisSerializer(PrimaryModelSerializer): master = NestedDeviceSerializer(required=False, allow_null=True, default=None) members = NestedDeviceSerializer(many=True, read_only=True) @@ -19,7 +19,7 @@ class VirtualChassisSerializer(NetBoxModelSerializer): class Meta: model = VirtualChassis fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'domain', 'master', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', 'member_count', 'members', + 'id', 'url', 'display_url', 'display', 'name', 'domain', 'master', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', 'member_count', 'members', ] brief_fields = ('id', 'url', 'display', 'name', 'master', 'description', 'member_count') diff --git a/netbox/extras/api/serializers_/configcontexts.py b/netbox/extras/api/serializers_/configcontexts.py index ff85f0fc6..631dc461b 100644 --- a/netbox/extras/api/serializers_/configcontexts.py +++ b/netbox/extras/api/serializers_/configcontexts.py @@ -8,7 +8,8 @@ from dcim.api.serializers_.sites import LocationSerializer, RegionSerializer, Si from dcim.models import DeviceRole, DeviceType, Location, Platform, Region, Site, SiteGroup from extras.models import ConfigContext, ConfigContextProfile, Tag from netbox.api.fields import SerializedPKRelatedField -from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer +from netbox.api.serializers import ChangeLogMessageSerializer, PrimaryModelSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin from tenancy.api.serializers_.tenants import TenantSerializer, TenantGroupSerializer from tenancy.models import Tenant, TenantGroup from virtualization.api.serializers_.clusters import ClusterSerializer, ClusterGroupSerializer, ClusterTypeSerializer @@ -20,13 +21,7 @@ __all__ = ( ) -class ConfigContextProfileSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): - tags = serializers.SlugRelatedField( - queryset=Tag.objects.all(), - slug_field='slug', - required=False, - many=True - ) +class ConfigContextProfileSerializer(PrimaryModelSerializer): data_source = DataSourceSerializer( nested=True, required=False @@ -39,13 +34,13 @@ class ConfigContextProfileSerializer(ChangeLogMessageSerializer, ValidatedModelS class Meta: model = ConfigContextProfile fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'description', 'schema', 'tags', 'comments', 'data_source', - 'data_path', 'data_file', 'data_synced', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'name', 'description', 'schema', 'tags', 'owner', 'comments', + 'data_source', 'data_path', 'data_file', 'data_synced', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') -class ConfigContextSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class ConfigContextSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): profile = ConfigContextProfileSerializer( nested=True, required=False, @@ -156,7 +151,7 @@ class ConfigContextSerializer(ChangeLogMessageSerializer, ValidatedModelSerializ fields = [ 'id', 'url', 'display_url', 'display', 'name', 'weight', 'profile', 'description', 'is_active', 'regions', 'site_groups', 'sites', 'locations', 'device_types', 'roles', 'platforms', 'cluster_types', - 'cluster_groups', 'clusters', 'tenant_groups', 'tenants', 'tags', 'data_source', 'data_path', 'data_file', - 'data_synced', 'data', 'created', 'last_updated', + 'cluster_groups', 'clusters', 'tenant_groups', 'tenants', 'owner', 'tags', 'data_source', 'data_path', + 'data_file', 'data_synced', 'data', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/extras/api/serializers_/configtemplates.py b/netbox/extras/api/serializers_/configtemplates.py index 244308535..068cdb4d4 100644 --- a/netbox/extras/api/serializers_/configtemplates.py +++ b/netbox/extras/api/serializers_/configtemplates.py @@ -2,13 +2,19 @@ from core.api.serializers_.data import DataFileSerializer, DataSourceSerializer from extras.models import ConfigTemplate from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer from netbox.api.serializers.features import TaggableModelSerializer +from users.api.serializers_.mixins import OwnerMixin __all__ = ( 'ConfigTemplateSerializer', ) -class ConfigTemplateSerializer(ChangeLogMessageSerializer, TaggableModelSerializer, ValidatedModelSerializer): +class ConfigTemplateSerializer( + OwnerMixin, + ChangeLogMessageSerializer, + TaggableModelSerializer, + ValidatedModelSerializer +): data_source = DataSourceSerializer( nested=True, required=False @@ -23,6 +29,6 @@ class ConfigTemplateSerializer(ChangeLogMessageSerializer, TaggableModelSerializ fields = [ 'id', 'url', 'display_url', 'display', 'name', 'description', 'environment_params', 'template_code', 'mime_type', 'file_name', 'file_extension', 'as_attachment', 'data_source', 'data_path', 'data_file', - 'data_synced', 'tags', 'created', 'last_updated', + 'data_synced', 'owner', 'tags', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/extras/api/serializers_/customfields.py b/netbox/extras/api/serializers_/customfields.py index 0d982a7e6..b12979439 100644 --- a/netbox/extras/api/serializers_/customfields.py +++ b/netbox/extras/api/serializers_/customfields.py @@ -8,6 +8,7 @@ from extras.choices import * from extras.models import CustomField, CustomFieldChoiceSet from netbox.api.fields import ChoiceField, ContentTypeField from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin __all__ = ( 'CustomFieldChoiceSetSerializer', @@ -15,7 +16,7 @@ __all__ = ( ) -class CustomFieldChoiceSetSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class CustomFieldChoiceSetSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): base_choices = ChoiceField( choices=CustomFieldChoiceSetBaseChoices, required=False @@ -32,12 +33,12 @@ class CustomFieldChoiceSetSerializer(ChangeLogMessageSerializer, ValidatedModelS model = CustomFieldChoiceSet fields = [ 'id', 'url', 'display_url', 'display', 'name', 'description', 'base_choices', 'extra_choices', - 'order_alphabetically', 'choices_count', 'created', 'last_updated', + 'order_alphabetically', 'choices_count', 'owner', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description', 'choices_count') -class CustomFieldSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class CustomFieldSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.with_feature('custom_fields'), many=True @@ -64,8 +65,8 @@ class CustomFieldSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer 'id', 'url', 'display_url', 'display', 'object_types', 'type', 'related_object_type', 'data_type', 'name', 'label', 'group_name', 'description', 'required', 'unique', 'search_weight', 'filter_logic', 'ui_visible', 'ui_editable', 'is_cloneable', 'default', 'related_object_filter', 'weight', - 'validation_minimum', 'validation_maximum', 'validation_regex', 'choice_set', 'comments', 'created', - 'last_updated', + 'validation_minimum', 'validation_maximum', 'validation_regex', 'choice_set', 'owner', 'comments', + 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/extras/api/serializers_/customlinks.py b/netbox/extras/api/serializers_/customlinks.py index 951c3aded..cca38f89f 100644 --- a/netbox/extras/api/serializers_/customlinks.py +++ b/netbox/extras/api/serializers_/customlinks.py @@ -2,13 +2,14 @@ from core.models import ObjectType from extras.models import CustomLink from netbox.api.fields import ContentTypeField from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin __all__ = ( 'CustomLinkSerializer', ) -class CustomLinkSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class CustomLinkSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.with_feature('custom_links'), many=True @@ -18,6 +19,6 @@ class CustomLinkSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer) model = CustomLink fields = [ 'id', 'url', 'display_url', 'display', 'object_types', 'name', 'enabled', 'link_text', 'link_url', - 'weight', 'group_name', 'button_class', 'new_window', 'created', 'last_updated', + 'weight', 'group_name', 'button_class', 'new_window', 'owner', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name') diff --git a/netbox/extras/api/serializers_/events.py b/netbox/extras/api/serializers_/events.py index 926259cf3..ea33ef99d 100644 --- a/netbox/extras/api/serializers_/events.py +++ b/netbox/extras/api/serializers_/events.py @@ -7,6 +7,7 @@ from extras.choices import * from extras.models import EventRule, Webhook from netbox.api.fields import ChoiceField, ContentTypeField from netbox.api.serializers import NetBoxModelSerializer +from users.api.serializers_.mixins import OwnerMixin from utilities.api import get_serializer_for_model from .scripts import ScriptSerializer @@ -20,7 +21,7 @@ __all__ = ( # Event Rules # -class EventRuleSerializer(NetBoxModelSerializer): +class EventRuleSerializer(OwnerMixin, NetBoxModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.with_feature('event_rules'), many=True @@ -36,7 +37,7 @@ class EventRuleSerializer(NetBoxModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'object_types', 'name', 'enabled', 'event_types', 'conditions', 'action_type', 'action_object_type', 'action_object_id', 'action_object', 'description', 'custom_fields', - 'tags', 'created', 'last_updated', + 'owner', 'tags', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') @@ -56,13 +57,13 @@ class EventRuleSerializer(NetBoxModelSerializer): # Webhooks # -class WebhookSerializer(NetBoxModelSerializer): +class WebhookSerializer(OwnerMixin, NetBoxModelSerializer): class Meta: model = Webhook fields = [ 'id', 'url', 'display_url', 'display', 'name', 'description', 'payload_url', 'http_method', 'http_content_type', 'additional_headers', 'body_template', 'secret', 'ssl_verification', 'ca_file_path', - 'custom_fields', 'tags', 'created', 'last_updated', + 'custom_fields', 'owner', 'tags', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/extras/api/serializers_/exporttemplates.py b/netbox/extras/api/serializers_/exporttemplates.py index 0d3eed442..8c4e453d6 100644 --- a/netbox/extras/api/serializers_/exporttemplates.py +++ b/netbox/extras/api/serializers_/exporttemplates.py @@ -3,13 +3,14 @@ from core.models import ObjectType from extras.models import ExportTemplate from netbox.api.fields import ContentTypeField from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin __all__ = ( 'ExportTemplateSerializer', ) -class ExportTemplateSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class ExportTemplateSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.with_feature('export_templates'), many=True @@ -28,6 +29,6 @@ class ExportTemplateSerializer(ChangeLogMessageSerializer, ValidatedModelSeriali fields = [ 'id', 'url', 'display_url', 'display', 'object_types', 'name', 'description', 'environment_params', 'template_code', 'mime_type', 'file_name', 'file_extension', 'as_attachment', 'data_source', - 'data_path', 'data_file', 'data_synced', 'created', 'last_updated', + 'data_path', 'data_file', 'data_synced', 'owner', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/extras/api/serializers_/savedfilters.py b/netbox/extras/api/serializers_/savedfilters.py index e7128389c..830453e6f 100644 --- a/netbox/extras/api/serializers_/savedfilters.py +++ b/netbox/extras/api/serializers_/savedfilters.py @@ -2,13 +2,14 @@ from core.models import ObjectType from extras.models import SavedFilter from netbox.api.fields import ContentTypeField from netbox.api.serializers import ChangeLogMessageSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin __all__ = ( 'SavedFilterSerializer', ) -class SavedFilterSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class SavedFilterSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.all(), many=True @@ -18,6 +19,6 @@ class SavedFilterSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer model = SavedFilter fields = [ 'id', 'url', 'display_url', 'display', 'object_types', 'name', 'slug', 'description', 'user', 'weight', - 'enabled', 'shared', 'parameters', 'created', 'last_updated', + 'enabled', 'shared', 'parameters', 'owner', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description') diff --git a/netbox/extras/api/serializers_/tags.py b/netbox/extras/api/serializers_/tags.py index 7567a4543..75ca4e9d2 100644 --- a/netbox/extras/api/serializers_/tags.py +++ b/netbox/extras/api/serializers_/tags.py @@ -6,6 +6,7 @@ from extras.models import Tag, TaggedItem from netbox.api.exceptions import SerializerNotFound from netbox.api.fields import ContentTypeField, RelatedObjectCountField from netbox.api.serializers import BaseModelSerializer, ChangeLogMessageSerializer, ValidatedModelSerializer +from users.api.serializers_.mixins import OwnerMixin from utilities.api import get_serializer_for_model __all__ = ( @@ -14,7 +15,7 @@ __all__ = ( ) -class TagSerializer(ChangeLogMessageSerializer, ValidatedModelSerializer): +class TagSerializer(OwnerMixin, ChangeLogMessageSerializer, ValidatedModelSerializer): object_types = ContentTypeField( queryset=ObjectType.objects.with_feature('tags'), many=True, diff --git a/netbox/ipam/api/serializers_/asns.py b/netbox/ipam/api/serializers_/asns.py index 8baa073f5..b297ff590 100644 --- a/netbox/ipam/api/serializers_/asns.py +++ b/netbox/ipam/api/serializers_/asns.py @@ -2,7 +2,7 @@ from rest_framework import serializers from ipam.models import ASN, ASNRange, RIR from netbox.api.fields import RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import OrganizationalModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer __all__ = ( @@ -13,7 +13,7 @@ __all__ = ( ) -class RIRSerializer(NetBoxModelSerializer): +class RIRSerializer(OrganizationalModelSerializer): # Related object counts aggregate_count = RelatedObjectCountField('aggregates') @@ -21,13 +21,13 @@ class RIRSerializer(NetBoxModelSerializer): class Meta: model = RIR fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'is_private', 'description', 'tags', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'is_private', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'aggregate_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'aggregate_count') -class ASNRangeSerializer(NetBoxModelSerializer): +class ASNRangeSerializer(OrganizationalModelSerializer): rir = RIRSerializer(nested=True) tenant = TenantSerializer(nested=True, required=False, allow_null=True) asn_count = serializers.IntegerField(read_only=True) @@ -36,12 +36,12 @@ class ASNRangeSerializer(NetBoxModelSerializer): model = ASNRange fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'rir', 'start', 'end', 'tenant', 'description', - 'tags', 'custom_fields', 'created', 'last_updated', 'asn_count', + 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'asn_count', ] brief_fields = ('id', 'url', 'display', 'name', 'description') -class ASNSerializer(NetBoxModelSerializer): +class ASNSerializer(PrimaryModelSerializer): rir = RIRSerializer(nested=True, required=False, allow_null=True) tenant = TenantSerializer(nested=True, required=False, allow_null=True) @@ -52,7 +52,7 @@ class ASNSerializer(NetBoxModelSerializer): class Meta: model = ASN fields = [ - 'id', 'url', 'display_url', 'display', 'asn', 'rir', 'tenant', 'description', 'comments', 'tags', + 'id', 'url', 'display_url', 'display', 'asn', 'rir', 'tenant', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'site_count', 'provider_count', ] brief_fields = ('id', 'url', 'display', 'asn', 'description') diff --git a/netbox/ipam/api/serializers_/fhrpgroups.py b/netbox/ipam/api/serializers_/fhrpgroups.py index b5bebbc95..82750f1ba 100644 --- a/netbox/ipam/api/serializers_/fhrpgroups.py +++ b/netbox/ipam/api/serializers_/fhrpgroups.py @@ -4,7 +4,7 @@ from rest_framework import serializers from ipam.models import FHRPGroup, FHRPGroupAssignment from netbox.api.fields import ContentTypeField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, PrimaryModelSerializer from utilities.api import get_serializer_for_model from .ip import IPAddressSerializer @@ -14,14 +14,14 @@ __all__ = ( ) -class FHRPGroupSerializer(NetBoxModelSerializer): +class FHRPGroupSerializer(PrimaryModelSerializer): ip_addresses = IPAddressSerializer(nested=True, many=True, read_only=True) class Meta: model = FHRPGroup fields = [ 'id', 'name', 'url', 'display_url', 'display', 'protocol', 'group_id', 'auth_type', 'auth_key', - 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'ip_addresses', + 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'ip_addresses', ] brief_fields = ('id', 'url', 'display', 'protocol', 'group_id', 'description') diff --git a/netbox/ipam/api/serializers_/ip.py b/netbox/ipam/api/serializers_/ip.py index 5337b86f1..7dd277479 100644 --- a/netbox/ipam/api/serializers_/ip.py +++ b/netbox/ipam/api/serializers_/ip.py @@ -7,7 +7,7 @@ from ipam.choices import * from ipam.constants import IPADDRESS_ASSIGNMENT_MODELS from ipam.models import Aggregate, IPAddress, IPRange, Prefix from netbox.api.fields import ChoiceField, ContentTypeField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from .asns import RIRSerializer @@ -28,7 +28,7 @@ __all__ = ( ) -class AggregateSerializer(NetBoxModelSerializer): +class AggregateSerializer(PrimaryModelSerializer): family = ChoiceField(choices=IPAddressFamilyChoices, read_only=True) rir = RIRSerializer(nested=True) tenant = TenantSerializer(nested=True, required=False, allow_null=True) @@ -38,12 +38,12 @@ class AggregateSerializer(NetBoxModelSerializer): model = Aggregate fields = [ 'id', 'url', 'display_url', 'display', 'family', 'prefix', 'rir', 'tenant', 'date_added', 'description', - 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'family', 'prefix', 'description') -class PrefixSerializer(NetBoxModelSerializer): +class PrefixSerializer(PrimaryModelSerializer): family = ChoiceField(choices=IPAddressFamilyChoices, read_only=True) vrf = VRFSerializer(nested=True, required=False, allow_null=True) scope_type = ContentTypeField( @@ -68,7 +68,7 @@ class PrefixSerializer(NetBoxModelSerializer): model = Prefix fields = [ 'id', 'url', 'display_url', 'display', 'family', 'prefix', 'vrf', 'scope_type', 'scope_id', 'scope', - 'tenant', 'vlan', 'status', 'role', 'is_pool', 'mark_utilized', 'description', 'comments', 'tags', + 'tenant', 'vlan', 'status', 'role', 'is_pool', 'mark_utilized', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'children', '_depth', ] brief_fields = ('id', 'url', 'display', 'family', 'prefix', 'description', '_depth') @@ -133,7 +133,7 @@ class AvailablePrefixSerializer(serializers.Serializer): # IP ranges # -class IPRangeSerializer(NetBoxModelSerializer): +class IPRangeSerializer(PrimaryModelSerializer): family = ChoiceField(choices=IPAddressFamilyChoices, read_only=True) start_address = IPAddressField() end_address = IPAddressField() @@ -146,7 +146,7 @@ class IPRangeSerializer(NetBoxModelSerializer): model = IPRange fields = [ 'id', 'url', 'display_url', 'display', 'family', 'start_address', 'end_address', 'size', 'vrf', 'tenant', - 'status', 'role', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'status', 'role', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'mark_populated', 'mark_utilized', ] brief_fields = ('id', 'url', 'display', 'family', 'start_address', 'end_address', 'description') @@ -156,7 +156,7 @@ class IPRangeSerializer(NetBoxModelSerializer): # IP addresses # -class IPAddressSerializer(NetBoxModelSerializer): +class IPAddressSerializer(PrimaryModelSerializer): family = ChoiceField(choices=IPAddressFamilyChoices, read_only=True) address = IPAddressField() vrf = VRFSerializer(nested=True, required=False, allow_null=True) @@ -177,7 +177,7 @@ class IPAddressSerializer(NetBoxModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'family', 'address', 'vrf', 'tenant', 'status', 'role', 'assigned_object_type', 'assigned_object_id', 'assigned_object', 'nat_inside', 'nat_outside', - 'dns_name', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'dns_name', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'family', 'address', 'description') diff --git a/netbox/ipam/api/serializers_/roles.py b/netbox/ipam/api/serializers_/roles.py index 99fd6f470..b4fa2c1bc 100644 --- a/netbox/ipam/api/serializers_/roles.py +++ b/netbox/ipam/api/serializers_/roles.py @@ -1,13 +1,13 @@ from ipam.models import Role from netbox.api.fields import RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import OrganizationalModelSerializer __all__ = ( 'RoleSerializer', ) -class RoleSerializer(NetBoxModelSerializer): +class RoleSerializer(OrganizationalModelSerializer): # Related object counts prefix_count = RelatedObjectCountField('prefixes') @@ -16,7 +16,7 @@ class RoleSerializer(NetBoxModelSerializer): class Meta: model = Role fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'weight', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'prefix_count', 'vlan_count', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'weight', 'description', 'owner', 'tags', + 'custom_fields', 'created', 'last_updated', 'prefix_count', 'vlan_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'prefix_count', 'vlan_count') diff --git a/netbox/ipam/api/serializers_/services.py b/netbox/ipam/api/serializers_/services.py index c7c1bb136..ad7c3e00b 100644 --- a/netbox/ipam/api/serializers_/services.py +++ b/netbox/ipam/api/serializers_/services.py @@ -6,7 +6,7 @@ from ipam.choices import * from ipam.constants import SERVICE_ASSIGNMENT_MODELS from ipam.models import IPAddress, Service, ServiceTemplate from netbox.api.fields import ChoiceField, ContentTypeField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from utilities.api import get_serializer_for_model from .ip import IPAddressSerializer @@ -16,19 +16,19 @@ __all__ = ( ) -class ServiceTemplateSerializer(NetBoxModelSerializer): +class ServiceTemplateSerializer(PrimaryModelSerializer): protocol = ChoiceField(choices=ServiceProtocolChoices, required=False) class Meta: model = ServiceTemplate fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'protocol', 'ports', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'name', 'protocol', 'ports', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'protocol', 'ports', 'description') -class ServiceSerializer(NetBoxModelSerializer): +class ServiceSerializer(PrimaryModelSerializer): protocol = ChoiceField(choices=ServiceProtocolChoices, required=False) ipaddresses = SerializedPKRelatedField( queryset=IPAddress.objects.all(), @@ -46,7 +46,7 @@ class ServiceSerializer(NetBoxModelSerializer): model = Service fields = [ 'id', 'url', 'display_url', 'display', 'parent_object_type', 'parent_object_id', 'parent', 'name', - 'protocol', 'ports', 'ipaddresses', 'description', 'comments', 'tags', 'custom_fields', + 'protocol', 'ports', 'ipaddresses', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'protocol', 'ports', 'description') diff --git a/netbox/ipam/api/serializers_/vlans.py b/netbox/ipam/api/serializers_/vlans.py index 3eada3193..7f2633e27 100644 --- a/netbox/ipam/api/serializers_/vlans.py +++ b/netbox/ipam/api/serializers_/vlans.py @@ -7,7 +7,7 @@ from ipam.choices import * from ipam.constants import VLANGROUP_SCOPE_TYPES from ipam.models import VLAN, VLANGroup, VLANTranslationPolicy, VLANTranslationRule from netbox.api.fields import ChoiceField, ContentTypeField, IntegerRangeSerializer, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, OrganizationalModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from vpn.api.serializers_.l2vpn import L2VPNTerminationSerializer @@ -24,7 +24,7 @@ __all__ = ( ) -class VLANGroupSerializer(NetBoxModelSerializer): +class VLANGroupSerializer(OrganizationalModelSerializer): scope_type = ContentTypeField( queryset=ContentType.objects.filter( model__in=VLANGROUP_SCOPE_TYPES @@ -46,7 +46,8 @@ class VLANGroupSerializer(NetBoxModelSerializer): model = VLANGroup fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'scope_type', 'scope_id', 'scope', 'vid_ranges', - 'tenant', 'description', 'tags', 'custom_fields', 'created', 'last_updated', 'vlan_count', 'utilization' + 'tenant', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'vlan_count', + 'utilization', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'vlan_count') validators = [] @@ -60,7 +61,7 @@ class VLANGroupSerializer(NetBoxModelSerializer): return serializer(obj.scope, nested=True, context=context).data -class VLANSerializer(NetBoxModelSerializer): +class VLANSerializer(PrimaryModelSerializer): site = SiteSerializer(nested=True, required=False, allow_null=True) group = VLANGroupSerializer(nested=True, required=False, allow_null=True, default=None) tenant = TenantSerializer(nested=True, required=False, allow_null=True) @@ -77,7 +78,7 @@ class VLANSerializer(NetBoxModelSerializer): model = VLAN fields = [ 'id', 'url', 'display_url', 'display', 'site', 'group', 'vid', 'name', 'tenant', 'status', 'role', - 'description', 'qinq_role', 'qinq_svlan', 'comments', 'l2vpn_termination', 'tags', 'custom_fields', + 'description', 'qinq_role', 'qinq_svlan', 'owner', 'comments', 'l2vpn_termination', 'tags', 'custom_fields', 'created', 'last_updated', 'prefix_count', ] brief_fields = ('id', 'url', 'display', 'vid', 'name', 'description') @@ -125,10 +126,10 @@ class VLANTranslationRuleSerializer(NetBoxModelSerializer): fields = ['id', 'url', 'display', 'policy', 'local_vid', 'remote_vid', 'description'] -class VLANTranslationPolicySerializer(NetBoxModelSerializer): +class VLANTranslationPolicySerializer(PrimaryModelSerializer): rules = VLANTranslationRuleSerializer(many=True, read_only=True) class Meta: model = VLANTranslationPolicy - fields = ['id', 'url', 'display', 'name', 'description', 'display', 'rules'] + fields = ['id', 'url', 'display', 'name', 'description', 'display', 'rules', 'owner', 'comments'] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/ipam/api/serializers_/vrfs.py b/netbox/ipam/api/serializers_/vrfs.py index a23909108..67630f83c 100644 --- a/netbox/ipam/api/serializers_/vrfs.py +++ b/netbox/ipam/api/serializers_/vrfs.py @@ -1,6 +1,6 @@ from ipam.models import RouteTarget, VRF from netbox.api.fields import RelatedObjectCountField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer __all__ = ( @@ -9,19 +9,19 @@ __all__ = ( ) -class RouteTargetSerializer(NetBoxModelSerializer): +class RouteTargetSerializer(PrimaryModelSerializer): tenant = TenantSerializer(nested=True, required=False, allow_null=True) class Meta: model = RouteTarget fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'tenant', 'description', 'comments', 'tags', + 'id', 'url', 'display_url', 'display', 'name', 'tenant', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') -class VRFSerializer(NetBoxModelSerializer): +class VRFSerializer(PrimaryModelSerializer): tenant = TenantSerializer(nested=True, required=False, allow_null=True) import_targets = SerializedPKRelatedField( queryset=RouteTarget.objects.all(), @@ -43,8 +43,8 @@ class VRFSerializer(NetBoxModelSerializer): class Meta: model = VRF fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'rd', 'tenant', 'enforce_unique', 'description', 'comments', - 'import_targets', 'export_targets', 'tags', 'custom_fields', 'created', 'last_updated', 'ipaddress_count', - 'prefix_count', + 'id', 'url', 'display_url', 'display', 'name', 'rd', 'tenant', 'enforce_unique', 'description', 'owner', + 'comments', 'import_targets', 'export_targets', 'tags', 'custom_fields', 'created', 'last_updated', + 'ipaddress_count', 'prefix_count', ] brief_fields = ('id', 'url', 'display', 'name', 'rd', 'description', 'prefix_count') diff --git a/netbox/netbox/api/serializers/__init__.py b/netbox/netbox/api/serializers/__init__.py index d7ad19565..2d95e932b 100644 --- a/netbox/netbox/api/serializers/__init__.py +++ b/netbox/netbox/api/serializers/__init__.py @@ -1,33 +1,6 @@ -from rest_framework import serializers - from .base import * from .features import * from .generic import * from .nested import * - - -# -# Base model serializers -# - -class NetBoxModelSerializer( - ChangeLogMessageSerializer, - TaggableModelSerializer, - CustomFieldModelSerializer, - ValidatedModelSerializer -): - """ - Adds support for custom fields and tags. - """ - pass - - -class NestedGroupModelSerializer(NetBoxModelSerializer): - """ - Extends PrimaryModelSerializer to include MPTT support. - """ - _depth = serializers.IntegerField(source='level', read_only=True) - - -class BulkOperationSerializer(ChangeLogMessageSerializer): - id = serializers.IntegerField() +from .models import * +from .bulk import * diff --git a/netbox/netbox/api/serializers/bulk.py b/netbox/netbox/api/serializers/bulk.py new file mode 100644 index 000000000..c9fd28534 --- /dev/null +++ b/netbox/netbox/api/serializers/bulk.py @@ -0,0 +1,11 @@ +from rest_framework import serializers + +from .features import ChangeLogMessageSerializer + +__all__ = ( + 'BulkOperationSerializer', +) + + +class BulkOperationSerializer(ChangeLogMessageSerializer): + id = serializers.IntegerField() diff --git a/netbox/netbox/api/serializers/features.py b/netbox/netbox/api/serializers/features.py index 1ee92e828..00315868e 100644 --- a/netbox/netbox/api/serializers/features.py +++ b/netbox/netbox/api/serializers/features.py @@ -2,11 +2,13 @@ from rest_framework import serializers from rest_framework.fields import CreateOnlyDefault from extras.api.customfields import CustomFieldsDataField, CustomFieldDefaultValues +from .base import ValidatedModelSerializer from .nested import NestedTagSerializer __all__ = ( 'ChangeLogMessageSerializer', 'CustomFieldModelSerializer', + 'NetBoxModelSerializer', 'TaggableModelSerializer', ) @@ -76,3 +78,15 @@ class ChangeLogMessageSerializer(serializers.Serializer): if self.instance is not None: self.instance._changelog_message = self.validated_data.get('changelog_message') return super().save(**kwargs) + + +class NetBoxModelSerializer( + ChangeLogMessageSerializer, + TaggableModelSerializer, + CustomFieldModelSerializer, + ValidatedModelSerializer +): + """ + Adds support for custom fields and tags. + """ + pass diff --git a/netbox/netbox/api/serializers/models.py b/netbox/netbox/api/serializers/models.py new file mode 100644 index 000000000..5d81f5b9a --- /dev/null +++ b/netbox/netbox/api/serializers/models.py @@ -0,0 +1,31 @@ +from rest_framework import serializers + +from .features import NetBoxModelSerializer +from users.api.serializers_.mixins import OwnerMixin + +__all__ = ( + 'NestedGroupModelSerializer', + 'OrganizationalModelSerializer', + 'PrimaryModelSerializer', +) + + +class PrimaryModelSerializer(OwnerMixin, NetBoxModelSerializer): + """ + Base serializer class for models inheriting from PrimaryModel. + """ + pass + + +class NestedGroupModelSerializer(OwnerMixin, NetBoxModelSerializer): + """ + Base serializer class for models inheriting from NestedGroupModel. + """ + _depth = serializers.IntegerField(source='level', read_only=True) + + +class OrganizationalModelSerializer(OwnerMixin, NetBoxModelSerializer): + """ + Base serializer class for models inheriting from OrganizationalModel. + """ + pass diff --git a/netbox/netbox/models/features.py b/netbox/netbox/models/features.py index df4284f28..e0d03d6e7 100644 --- a/netbox/netbox/models/features.py +++ b/netbox/netbox/models/features.py @@ -641,7 +641,6 @@ register_model_feature('image_attachments', lambda model: issubclass(model, Imag register_model_feature('jobs', lambda model: issubclass(model, JobsMixin)) register_model_feature('journaling', lambda model: issubclass(model, JournalingMixin)) register_model_feature('notifications', lambda model: issubclass(model, NotificationsMixin)) -register_model_feature('owner', lambda model: issubclass(model, OwnerMixin)) register_model_feature('synced_data', lambda model: issubclass(model, SyncedDataMixin)) register_model_feature('tags', lambda model: issubclass(model, TagsMixin)) diff --git a/netbox/tenancy/api/serializers_/contacts.py b/netbox/tenancy/api/serializers_/contacts.py index fd4d1ac8e..19c496139 100644 --- a/netbox/tenancy/api/serializers_/contacts.py +++ b/netbox/tenancy/api/serializers_/contacts.py @@ -4,7 +4,9 @@ from drf_spectacular.utils import extend_schema_field from rest_framework import serializers from netbox.api.fields import ChoiceField, ContentTypeField, SerializedPKRelatedField -from netbox.api.serializers import NestedGroupModelSerializer, NetBoxModelSerializer +from netbox.api.serializers import ( + NestedGroupModelSerializer, NetBoxModelSerializer, OrganizationalModelSerializer, PrimaryModelSerializer, +) from tenancy.choices import ContactPriorityChoices from tenancy.models import ContactAssignment, Contact, ContactGroup, ContactRole from utilities.api import get_serializer_for_model @@ -26,23 +28,23 @@ class ContactGroupSerializer(NestedGroupModelSerializer): model = ContactGroup fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'parent', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'contact_count', 'comments', '_depth', + 'created', 'last_updated', 'contact_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'contact_count', '_depth') -class ContactRoleSerializer(NetBoxModelSerializer): +class ContactRoleSerializer(OrganizationalModelSerializer): class Meta: model = ContactRole fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description') -class ContactSerializer(NetBoxModelSerializer): +class ContactSerializer(PrimaryModelSerializer): groups = SerializedPKRelatedField( queryset=ContactGroup.objects.all(), serializer=ContactGroupSerializer, @@ -55,7 +57,7 @@ class ContactSerializer(NetBoxModelSerializer): model = Contact fields = [ 'id', 'url', 'display_url', 'display', 'groups', 'name', 'title', 'phone', 'email', 'address', 'link', - 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/tenancy/api/serializers_/tenants.py b/netbox/tenancy/api/serializers_/tenants.py index 189397c70..277bdc987 100644 --- a/netbox/tenancy/api/serializers_/tenants.py +++ b/netbox/tenancy/api/serializers_/tenants.py @@ -1,7 +1,7 @@ from rest_framework import serializers from netbox.api.fields import RelatedObjectCountField -from netbox.api.serializers import NestedGroupModelSerializer, NetBoxModelSerializer +from netbox.api.serializers import NestedGroupModelSerializer, PrimaryModelSerializer from tenancy.models import Tenant, TenantGroup from .nested import NestedTenantGroupSerializer @@ -19,12 +19,12 @@ class TenantGroupSerializer(NestedGroupModelSerializer): model = TenantGroup fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'parent', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'tenant_count', 'comments', '_depth', + 'created', 'last_updated', 'tenant_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'tenant_count', '_depth') -class TenantSerializer(NetBoxModelSerializer): +class TenantSerializer(PrimaryModelSerializer): group = TenantGroupSerializer(nested=True, required=False, allow_null=True, default=None) # Related object counts @@ -42,7 +42,7 @@ class TenantSerializer(NetBoxModelSerializer): class Meta: model = Tenant fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'group', 'description', 'comments', 'tags', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'group', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'circuit_count', 'device_count', 'ipaddress_count', 'prefix_count', 'rack_count', 'site_count', 'virtualmachine_count', 'vlan_count', 'vrf_count', 'cluster_count', diff --git a/netbox/users/api/serializers_/mixins.py b/netbox/users/api/serializers_/mixins.py new file mode 100644 index 000000000..b5f94cafd --- /dev/null +++ b/netbox/users/api/serializers_/mixins.py @@ -0,0 +1,18 @@ +from rest_framework import serializers + +from users.api.serializers_.owners import OwnerSerializer + +__all__ = ( + 'OwnerMixin', +) + + +class OwnerMixin(serializers.Serializer): + """ + Adds an `owner` field for models which have a ForeignKey to users.Owner. + """ + owner = OwnerSerializer( + nested=True, + required=False, + allow_null=True, + ) diff --git a/netbox/virtualization/api/serializers_/clusters.py b/netbox/virtualization/api/serializers_/clusters.py index ff64db1cf..a48af9ce0 100644 --- a/netbox/virtualization/api/serializers_/clusters.py +++ b/netbox/virtualization/api/serializers_/clusters.py @@ -3,7 +3,7 @@ from django.contrib.contenttypes.models import ContentType from drf_spectacular.utils import extend_schema_field from rest_framework import serializers from netbox.api.fields import ChoiceField, ContentTypeField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import OrganizationalModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from virtualization.choices import * from virtualization.models import Cluster, ClusterGroup, ClusterType @@ -16,7 +16,7 @@ __all__ = ( ) -class ClusterTypeSerializer(NetBoxModelSerializer): +class ClusterTypeSerializer(OrganizationalModelSerializer): # Related object counts cluster_count = RelatedObjectCountField('clusters') @@ -24,13 +24,13 @@ class ClusterTypeSerializer(NetBoxModelSerializer): class Meta: model = ClusterType fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'cluster_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'cluster_count') -class ClusterGroupSerializer(NetBoxModelSerializer): +class ClusterGroupSerializer(OrganizationalModelSerializer): # Related object counts cluster_count = RelatedObjectCountField('clusters') @@ -38,13 +38,13 @@ class ClusterGroupSerializer(NetBoxModelSerializer): class Meta: model = ClusterGroup fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'cluster_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'cluster_count') -class ClusterSerializer(NetBoxModelSerializer): +class ClusterSerializer(PrimaryModelSerializer): type = ClusterTypeSerializer(nested=True) group = ClusterGroupSerializer(nested=True, required=False, allow_null=True, default=None) status = ChoiceField(choices=ClusterStatusChoices, required=False) @@ -76,7 +76,7 @@ class ClusterSerializer(NetBoxModelSerializer): model = Cluster fields = [ 'id', 'url', 'display_url', 'display', 'name', 'type', 'group', 'status', 'tenant', 'scope_type', - 'scope_id', 'scope', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'scope_id', 'scope', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', 'device_count', 'virtualmachine_count', 'allocated_vcpus', 'allocated_memory', 'allocated_disk' ] brief_fields = ('id', 'url', 'display', 'name', 'description', 'virtualmachine_count') diff --git a/netbox/virtualization/api/serializers_/virtualmachines.py b/netbox/virtualization/api/serializers_/virtualmachines.py index ed14b0a29..c035a436a 100644 --- a/netbox/virtualization/api/serializers_/virtualmachines.py +++ b/netbox/virtualization/api/serializers_/virtualmachines.py @@ -13,7 +13,7 @@ from ipam.api.serializers_.vlans import VLANSerializer, VLANTranslationPolicySer from ipam.api.serializers_.vrfs import VRFSerializer from ipam.models import VLAN from netbox.api.fields import ChoiceField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from virtualization.choices import * from virtualization.models import VirtualDisk, VirtualMachine, VMInterface @@ -29,7 +29,7 @@ __all__ = ( ) -class VirtualMachineSerializer(NetBoxModelSerializer): +class VirtualMachineSerializer(PrimaryModelSerializer): status = ChoiceField(choices=VirtualMachineStatusChoices, required=False) site = SiteSerializer(nested=True, required=False, allow_null=True, default=None) cluster = ClusterSerializer(nested=True, required=False, allow_null=True, default=None) @@ -51,8 +51,8 @@ class VirtualMachineSerializer(NetBoxModelSerializer): fields = [ 'id', 'url', 'display_url', 'display', 'name', 'status', 'site', 'cluster', 'device', 'serial', 'role', 'tenant', 'platform', 'primary_ip', 'primary_ip4', 'primary_ip6', 'vcpus', 'memory', 'disk', 'description', - 'comments', 'config_template', 'local_context_data', 'tags', 'custom_fields', 'created', 'last_updated', - 'interface_count', 'virtual_disk_count', + 'owner', 'comments', 'config_template', 'local_context_data', 'tags', 'custom_fields', 'created', + 'last_updated', 'interface_count', 'virtual_disk_count', ] brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/vpn/api/serializers_/crypto.py b/netbox/vpn/api/serializers_/crypto.py index 50085884b..83b10af15 100644 --- a/netbox/vpn/api/serializers_/crypto.py +++ b/netbox/vpn/api/serializers_/crypto.py @@ -1,5 +1,5 @@ from netbox.api.fields import ChoiceField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from vpn.choices import * from vpn.models import IKEPolicy, IKEProposal, IPSecPolicy, IPSecProfile, IPSecProposal @@ -12,7 +12,7 @@ __all__ = ( ) -class IKEProposalSerializer(NetBoxModelSerializer): +class IKEProposalSerializer(PrimaryModelSerializer): authentication_method = ChoiceField( choices=AuthenticationMethodChoices ) @@ -31,13 +31,13 @@ class IKEProposalSerializer(NetBoxModelSerializer): model = IKEProposal fields = ( 'id', 'url', 'display_url', 'display', 'name', 'description', 'authentication_method', - 'encryption_algorithm', 'authentication_algorithm', 'group', 'sa_lifetime', 'comments', 'tags', + 'encryption_algorithm', 'authentication_algorithm', 'group', 'sa_lifetime', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ) brief_fields = ('id', 'url', 'display', 'name', 'description') -class IKEPolicySerializer(NetBoxModelSerializer): +class IKEPolicySerializer(PrimaryModelSerializer): version = ChoiceField( choices=IKEVersionChoices ) @@ -57,12 +57,12 @@ class IKEPolicySerializer(NetBoxModelSerializer): model = IKEPolicy fields = ( 'id', 'url', 'display_url', 'display', 'name', 'description', 'version', 'mode', 'proposals', - 'preshared_key', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'preshared_key', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ) brief_fields = ('id', 'url', 'display', 'name', 'description') -class IPSecProposalSerializer(NetBoxModelSerializer): +class IPSecProposalSerializer(PrimaryModelSerializer): encryption_algorithm = ChoiceField( choices=EncryptionAlgorithmChoices, required=False @@ -76,13 +76,13 @@ class IPSecProposalSerializer(NetBoxModelSerializer): model = IPSecProposal fields = ( 'id', 'url', 'display_url', 'display', 'name', 'description', 'encryption_algorithm', - 'authentication_algorithm', 'sa_lifetime_seconds', 'sa_lifetime_data', 'comments', 'tags', 'custom_fields', - 'created', 'last_updated', + 'authentication_algorithm', 'sa_lifetime_seconds', 'sa_lifetime_data', 'owner', 'comments', 'tags', + 'custom_fields', 'created', 'last_updated', ) brief_fields = ('id', 'url', 'display', 'name', 'description') -class IPSecPolicySerializer(NetBoxModelSerializer): +class IPSecPolicySerializer(PrimaryModelSerializer): proposals = SerializedPKRelatedField( queryset=IPSecProposal.objects.all(), serializer=IPSecProposalSerializer, @@ -98,13 +98,13 @@ class IPSecPolicySerializer(NetBoxModelSerializer): class Meta: model = IPSecPolicy fields = ( - 'id', 'url', 'display_url', 'display', 'name', 'description', 'proposals', 'pfs_group', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'id', 'url', 'display_url', 'display', 'name', 'description', 'proposals', 'pfs_group', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ) brief_fields = ('id', 'url', 'display', 'name', 'description') -class IPSecProfileSerializer(NetBoxModelSerializer): +class IPSecProfileSerializer(PrimaryModelSerializer): mode = ChoiceField( choices=IPSecModeChoices ) @@ -118,7 +118,7 @@ class IPSecProfileSerializer(NetBoxModelSerializer): class Meta: model = IPSecProfile fields = ( - 'id', 'url', 'display_url', 'display', 'name', 'description', 'mode', 'ike_policy', 'ipsec_policy', + 'id', 'url', 'display_url', 'display', 'name', 'description', 'mode', 'ike_policy', 'ipsec_policy', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', ) brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/vpn/api/serializers_/l2vpn.py b/netbox/vpn/api/serializers_/l2vpn.py index f7c27113a..f9e9a9a97 100644 --- a/netbox/vpn/api/serializers_/l2vpn.py +++ b/netbox/vpn/api/serializers_/l2vpn.py @@ -5,7 +5,7 @@ from rest_framework import serializers from ipam.api.serializers_.vrfs import RouteTargetSerializer from ipam.models import RouteTarget from netbox.api.fields import ChoiceField, ContentTypeField, SerializedPKRelatedField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from vpn.choices import * @@ -17,7 +17,7 @@ __all__ = ( ) -class L2VPNSerializer(NetBoxModelSerializer): +class L2VPNSerializer(PrimaryModelSerializer): type = ChoiceField(choices=L2VPNTypeChoices, required=False) import_targets = SerializedPKRelatedField( queryset=RouteTarget.objects.all(), @@ -40,7 +40,8 @@ class L2VPNSerializer(NetBoxModelSerializer): model = L2VPN fields = [ 'id', 'url', 'display_url', 'display', 'identifier', 'name', 'slug', 'type', 'status', 'import_targets', - 'export_targets', 'description', 'comments', 'tenant', 'tags', 'custom_fields', 'created', 'last_updated' + 'export_targets', 'description', 'owner', 'comments', 'tenant', 'tags', 'custom_fields', 'created', + 'last_updated', ] brief_fields = ('id', 'url', 'display', 'identifier', 'name', 'slug', 'type', 'description') diff --git a/netbox/vpn/api/serializers_/tunnels.py b/netbox/vpn/api/serializers_/tunnels.py index a89766d3f..dfeb0339f 100644 --- a/netbox/vpn/api/serializers_/tunnels.py +++ b/netbox/vpn/api/serializers_/tunnels.py @@ -4,7 +4,7 @@ from rest_framework import serializers from ipam.api.serializers_.ip import IPAddressSerializer from netbox.api.fields import ChoiceField, ContentTypeField, RelatedObjectCountField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import NetBoxModelSerializer, OrganizationalModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from vpn.choices import * @@ -22,7 +22,7 @@ __all__ = ( # Tunnels # -class TunnelGroupSerializer(NetBoxModelSerializer): +class TunnelGroupSerializer(OrganizationalModelSerializer): # Related object counts tunnel_count = RelatedObjectCountField('tunnels') @@ -30,13 +30,13 @@ class TunnelGroupSerializer(NetBoxModelSerializer): class Meta: model = TunnelGroup fields = [ - 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'tags', 'custom_fields', + 'id', 'url', 'display_url', 'display', 'name', 'slug', 'description', 'owner', 'tags', 'custom_fields', 'created', 'last_updated', 'tunnel_count', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'tunnel_count') -class TunnelSerializer(NetBoxModelSerializer): +class TunnelSerializer(PrimaryModelSerializer): status = ChoiceField( choices=TunnelStatusChoices ) @@ -67,8 +67,8 @@ class TunnelSerializer(NetBoxModelSerializer): model = Tunnel fields = ( 'id', 'url', 'display_url', 'display', 'name', 'status', 'group', 'encapsulation', 'ipsec_profile', - 'tenant', 'tunnel_id', 'description', 'comments', 'tags', 'custom_fields', 'created', 'last_updated', - 'terminations_count', + 'tenant', 'tunnel_id', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', + 'last_updated', 'terminations_count', ) brief_fields = ('id', 'url', 'display', 'name', 'description') diff --git a/netbox/wireless/api/serializers_/wirelesslans.py b/netbox/wireless/api/serializers_/wirelesslans.py index 97d57f9f5..7403fe860 100644 --- a/netbox/wireless/api/serializers_/wirelesslans.py +++ b/netbox/wireless/api/serializers_/wirelesslans.py @@ -1,11 +1,11 @@ +from django.contrib.contenttypes.models import ContentType +from drf_spectacular.utils import extend_schema_field from rest_framework import serializers from dcim.constants import LOCATION_SCOPE_TYPES -from django.contrib.contenttypes.models import ContentType -from drf_spectacular.utils import extend_schema_field from ipam.api.serializers_.vlans import VLANSerializer from netbox.api.fields import ChoiceField, ContentTypeField -from netbox.api.serializers import NestedGroupModelSerializer, NetBoxModelSerializer +from netbox.api.serializers import NestedGroupModelSerializer, PrimaryModelSerializer from tenancy.api.serializers_.tenants import TenantSerializer from utilities.api import get_serializer_for_model from wireless.choices import * @@ -26,12 +26,12 @@ class WirelessLANGroupSerializer(NestedGroupModelSerializer): model = WirelessLANGroup fields = [ 'id', 'url', 'display_url', 'display', 'name', 'slug', 'parent', 'description', 'tags', 'custom_fields', - 'created', 'last_updated', 'wirelesslan_count', 'comments', '_depth', + 'created', 'last_updated', 'wirelesslan_count', 'owner', 'comments', '_depth', ] brief_fields = ('id', 'url', 'display', 'name', 'slug', 'description', 'wirelesslan_count', '_depth') -class WirelessLANSerializer(NetBoxModelSerializer): +class WirelessLANSerializer(PrimaryModelSerializer): group = WirelessLANGroupSerializer(nested=True, required=False, allow_null=True) status = ChoiceField(choices=WirelessLANStatusChoices, required=False, allow_blank=True) vlan = VLANSerializer(nested=True, required=False, allow_null=True) @@ -53,8 +53,8 @@ class WirelessLANSerializer(NetBoxModelSerializer): model = WirelessLAN fields = [ 'id', 'url', 'display_url', 'display', 'ssid', 'description', 'group', 'status', 'vlan', 'scope_type', - 'scope_id', 'scope', 'tenant', 'auth_type', 'auth_cipher', 'auth_psk', 'description', 'comments', 'tags', - 'custom_fields', 'created', 'last_updated', + 'scope_id', 'scope', 'tenant', 'auth_type', 'auth_cipher', 'auth_psk', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'ssid', 'description') diff --git a/netbox/wireless/api/serializers_/wirelesslinks.py b/netbox/wireless/api/serializers_/wirelesslinks.py index 62f9988f1..7b010d298 100644 --- a/netbox/wireless/api/serializers_/wirelesslinks.py +++ b/netbox/wireless/api/serializers_/wirelesslinks.py @@ -1,7 +1,7 @@ from dcim.api.serializers_.device_components import InterfaceSerializer from dcim.choices import LinkStatusChoices from netbox.api.fields import ChoiceField -from netbox.api.serializers import NetBoxModelSerializer +from netbox.api.serializers import PrimaryModelSerializer from netbox.choices import * from tenancy.api.serializers_.tenants import TenantSerializer from wireless.choices import * @@ -12,7 +12,7 @@ __all__ = ( ) -class WirelessLinkSerializer(NetBoxModelSerializer): +class WirelessLinkSerializer(PrimaryModelSerializer): status = ChoiceField(choices=LinkStatusChoices, required=False) interface_a = InterfaceSerializer(nested=True) interface_b = InterfaceSerializer(nested=True) @@ -25,7 +25,7 @@ class WirelessLinkSerializer(NetBoxModelSerializer): model = WirelessLink fields = [ 'id', 'url', 'display_url', 'display', 'interface_a', 'interface_b', 'ssid', 'status', 'tenant', - 'auth_type', 'auth_cipher', 'auth_psk', 'distance', 'distance_unit', 'description', - 'comments', 'tags', 'custom_fields', 'created', 'last_updated', + 'auth_type', 'auth_cipher', 'auth_psk', 'distance', 'distance_unit', 'description', 'owner', 'comments', + 'tags', 'custom_fields', 'created', 'last_updated', ] brief_fields = ('id', 'url', 'display', 'ssid', 'description')