{ "type": "object", "$id": "urn:devicetype-library:module-type", "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "manufacturer": { "type": "string", "maxLength": 100 }, "model": { "type": "string", "maxLength": 100 }, "part_number": { "type": "string", "maxLength": 50 }, "airflow": { "$ref": "urn:devicetype-library:generated-schema#/definitions/airflow" }, "weight": { "$ref": "urn:devicetype-library:reusable#/definitions/weight" }, "weight_unit": { "$ref": "urn:devicetype-library:generated-schema#/definitions/weight-unit" }, "console-ports": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/console-port" } }, "console-server-ports": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/console-server-port" } }, "power-ports": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/power-port" } }, "power-outlets": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/power-outlet" } }, "interfaces": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/interface" } }, "front-ports": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/front-port" } }, "rear-ports": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/rear-port" } }, "module-bays": { "type": "array", "items": { "$ref": "urn:devicetype-library:components#/definitions/module-bay" } }, "description": { "type": "string", "maxLength": 200 }, "comments": { "type": "string" } }, "allOf": [ { "if": { "required": ["weight"] }, "then": { "required": ["weight_unit"] } }, { "if": { "required": ["weight_unit"] }, "then": { "required": ["weight"] } } ], "required": ["manufacturer", "model"], "additionalProperties": false }