Updating schemas for autogenerated schema information (#1527)

This commit is contained in:
Daniel W. Anner 2023-08-02 15:12:52 -04:00 committed by GitHub
parent 2b4e3f9621
commit 7fd9b5a423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 277 additions and 258 deletions

View File

@ -1,214 +1,228 @@
{
"type": "object",
"additionalProperties": false,
"definitions": {
"console-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/console-port/properties/type"
},
"poe": {
"type": "boolean"
}
},
"required": ["name", "type"]
"type": "object",
"additionalProperties": false,
"definitions": {
"console-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"console-server-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/console-server-port/properties/type"
}
},
"required": ["name", "type"]
"label": {
"type": "string"
},
"power-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/power-port/properties/type"
},
"maximum_draw": {
"type": "integer"
},
"allocated_draw": {
"type": "integer"
}
},
"required": ["name", "type"]
"type": {
"$ref": "generated.json#/definitions/console-port/properties/type"
},
"power-outlet": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/power-outlet/properties/type"
},
"power_port": {
"type": "string"
},
"feed_leg": {
"type": "string",
"enum": ["A", "B", "C"]
}
},
"required": ["name", "type"]
},
"interface": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/interface/properties/type"
},
"poe_mode": {
"$ref": "generated.json#/definitions/interface/properties/poe_mode"
},
"poe_type": {
"$ref": "generated.json#/definitions/interface/properties/poe_type"
},
"mgmt_only": {
"type": "boolean"
}
},
"required": ["name", "type"]
},
"front-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/front-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"rear_port": {
"type": "string"
},
"rear_port_position": {
"type": "integer"
}
},
"required": ["name", "type", "rear_port"]
},
"rear-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/rear-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"positions": {
"type": "integer"
},
"poe": {
"type": "boolean"
}
},
"required": ["name", "type"]
},
"module-bay": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"position": {
"type": "string"
}
},
"required": ["name"]
},
"device-bay": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": ["name"]
},
"inventory-item": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"manufacturer": {
"type": "string"
},
"part_id": {
"type": "string"
}
},
"required": ["name"]
"poe": {
"type": "boolean"
}
},
"required": [
"name",
"type"
]
},
"console-server-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/console-server-port/properties/type"
}
},
"required": [
"name",
"type"
]
},
"power-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/power-port/properties/type"
},
"maximum_draw": {
"type": "integer"
},
"allocated_draw": {
"type": "integer"
}
},
"required": [
"name",
"type"
]
},
"power-outlet": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/power-outlet/properties/type"
},
"power_port": {
"type": "string"
},
"feed_leg": {
"$ref": "generated.json#/definitions/power-outlet/properties/feed-leg"
}
},
"required": [
"name",
"type"
]
},
"interface": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/interface/properties/type"
},
"poe_mode": {
"$ref": "generated.json#/definitions/interface/properties/poe_mode"
},
"poe_type": {
"$ref": "generated.json#/definitions/interface/properties/poe_type"
},
"mgmt_only": {
"type": "boolean"
}
},
"required": [
"name",
"type"
]
},
"front-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/front-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"rear_port": {
"type": "string"
},
"rear_port_position": {
"type": "integer"
}
},
"required": [
"name",
"type",
"rear_port"
]
},
"rear-port": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"$ref": "generated.json#/definitions/rear-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"positions": {
"type": "integer"
},
"poe": {
"type": "boolean"
}
},
"required": [
"name",
"type"
]
},
"module-bay": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"position": {
"type": "string"
}
},
"required": [
"name"
]
},
"device-bay": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"name"
]
},
"inventory-item": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"manufacturer": {
"type": "string"
},
"part_id": {
"type": "string"
}
},
"required": [
"name"
]
}
}
}
}

View File

@ -23,21 +23,13 @@
"type": "boolean"
},
"airflow": {
"type": "string",
"enum": [
"front-to-rear",
"rear-to-front",
"left-to-right",
"right-to-left",
"side-to-rear",
"passive"
]
"$ref": "generated.json#/definitions/airflow"
},
"weight": {
"$ref": "static.json#/definitions/weight"
"$ref": "reusable.json#/definitions/weight"
},
"weight_unit": {
"$ref": "static.json#/definitions/weight_unit"
"$ref": "generated.json#/definitions/weight-unit"
},
"front_image": {
"type": "boolean"
@ -46,11 +38,7 @@
"type": "boolean"
},
"subdevice_role": {
"type": "string",
"enum": [
"parent",
"child"
]
"$ref": "generated.json#/definitions/subdevice-role"
},
"is_powered": {
"type": "boolean"

View File

@ -2,6 +2,33 @@
"type": "object",
"additionalProperties": false,
"definitions": {
"airflow": {
"type": "string",
"enum": [
"front-to-rear",
"rear-to-front",
"left-to-right",
"right-to-left",
"side-to-rear",
"passive"
]
},
"weight-unit": {
"type": "string",
"enum": [
"kg",
"g",
"lb",
"oz"
]
},
"subdevice-role": {
"type": "string",
"enum": [
"parent",
"child"
]
},
"console-port": {
"type": "object",
"properties": {
@ -30,28 +57,27 @@
"console-server-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"de-9",
"db-25",
"rj-12",
"rj-45",
"mini-din-8",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
},
"required": ["name", "type"]
},
"type": {
"type": "string",
"enum": [
"de-9",
"db-25",
"rj-12",
"rj-45",
"mini-din-8",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
}
},
"power-port": {
"type": "object",
"properties": {
@ -249,7 +275,7 @@
"other"
]
},
"feed_leg": {
"feed-leg": {
"type": "string",
"enum": [
"A",

View File

@ -11,10 +11,10 @@
"type": "string"
},
"weight": {
"$ref": "static.json#/definitions/weight"
"$ref": "reusable.json#/definitions/weight"
},
"weight_unit": {
"$ref": "static.json#/definitions/weight_unit"
"$ref": "generated.json#/definitions/weight-unit"
},
"console-ports": {
"type": "array",

View File

@ -6,15 +6,6 @@
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"weight_unit": {
"type": "string",
"enum": [
"kg",
"g",
"lb",
"oz"
]
}
}
}