Skip to content
Snippets Groups Projects
Commit 46ca4e24 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

add invalid schema files to git

parent 5807ef0d
No related branches found
No related tags found
No related merge requests found
{
"definitions": {
"macaddr_t": {
"title": "MAC Address",
"type": "string",
"minLength": 17,
"maxLength": 17,
"pattern": "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$"
},
"noisepower_t": {
"title": "Noise",
"type": "integer",
"minimum": -127,
"maximum": 0
},
"channel_2_t": {
"title": "2.4GHz Channel",
"type": "integer",
"minimum": 1,
"maximum": 14
},
"channel_5_t": {
"title": "5GHz Channel",
"type": "integer",
"minimum": 32,
"maximum": 200
},
"channels_2_t": {
"title": "2.4GHz Channels",
"type": "array",
"items": {
"$ref": "#/definitions/channel_2_t"
}
},
"channels_5_t": {
"title": "5GHz Channels",
"type": "array",
"items": {
"$ref": "#/definitions/channel_5_t"
}
},
"iface_t": {
"title": "Interface",
"type": "string",
"minLength": 1,
"maxLength": 16
},
"band_t": {
"title": "WiFi Band",
"type": "string",
"enum": [
"2.4GHz",
"5GHz"
]
},
"bandwidth_t": {
"title": "Bandwidth",
"type": "integer",
"enum": [
20,
40,
80,
160
]
},
"aps_t": {
"type": "array",
"items": {
"type": "object",
"required": [
"ifname",
"status",
"ssid",
"bssid"
],
"properties": {
"ifname": {
"type": "string",
"minLength": 1,
"maxLength": 16
},
"status": {
"type": "string"
},
"ssid": {
"type": "string",
"minLength": 0,
"maxLength": 32
},
"bssid": {
"$ref": "#/definitions/macaddr_t"
}
}
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.iopsys.eu/wifi",
"type": "object",
"title": "wifi",
"object": "wifi",
"additionalProperties": false,
"properties": {
"status": {
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {}
},
"output": {
"type": "object",
"required": [
"radios"
],
"properties": {
"radios": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"isup",
"standard",
"country",
"band",
"channel",
"bandwidth",
"noise",
"rate",
"channels",
"accesspoints",
"backhauls"
],
"if": {
"properties": {
"band": {
"const": "2.4GHz"
}
}
},
"then": {
"properties": {
"channel": {
"$ref": "#/definitions/channel_2_t"
},
"channels": {
"$ref": "#/definitions/channels_2_t"
}
}
},
"else": {
"properties": {
"channel": {
"$ref": "#/definitions/channel_5_t"
},
"channels": {
"$ref": "#/definitions/channels_5_t"
}
}
},
"properties": {
"name": {
"$ref": "#/definitions/iface_t"
},
"isup": {
"type": "boolean"
},
"standard": {
"type": "string"
},
"country": {
"type": "string",
"minLength": 2,
"maxLength": 3
},
"band": {
"$ref": "#/definitions/band_t"
},
"bandwidth": {
"$ref": "#/definitions/bandwidth_t"
},
"noise": {
"$ref": "#/definitions/noisepower_t"
},
"rate": {
"type": "integer",
"minimum": 0
},
"accesspoints": {
"$ref": "#/definitions/aps_t"
},
"backhauls": {
"$ref": "#/definitions/aps_t"
}
}
}
}
}
}
}
}
}
{
"definitions": {
"macaddr_t": {
"title": "MAC Address",
"type": "string",
"minLength": 17,
"maxLength": 17,
"pattern": "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$"
},
"noisepower_t": {
"title": "Noise",
"type": "integer",
"minimum": -127,
"maximum": 0
},
"channel_2_t": {
"title": "2.4GHz Channel",
"type": "integer",
"minimum": 1,
"maximum": 14
},
"channel_5_t": {
"title": "5GHz Channel",
"type": "integer",
"minimum": 32,
"maximum": 200
},
"channels_2_t": {
"title": "2.4GHz Channels",
"type": "array",
"items": {
"$ref": "#/definitions/channel_2_t"
}
},
"channels_5_t": {
"title": "5GHz Channels",
"type": "array",
"items": {
"$ref": "#/definitions/channel_5_t"
}
},
"iface_t": {
"title": "Interface",
"type": "string",
"minLength": 1,
"maxLength": 16
},
"band_t": {
"title": "WiFi Band",
"type": "string",
"enum": [
"2.4GHz",
"5GHz"
]
},
"bandwidth_t": {
"title": "Bandwidth",
"type": "integer",
"enum": [
20,
40,
80,
160
]
},
"aps_t": {
"type": "array",
"items": {
"type": "object",
"required": [
"ifname",
"status",
"ssid",
"bssid"
],
"properties": {
"ifname": {
"type": "string",
"minLength": 1,
"maxLength": 16
},
"status": {
"type": "string"
},
"ssid": {
"type": "string",
"minLength": 0,
"maxLength": 32
},
"bssid": {
"$ref": "#/definitions/macaddr_t"
}
}
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.iopsys.eu/wifi",
"type": "object",
"title": "wifi",
"additionalProperties": false,
"properties": {
"status": {
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {}
},
"output": {
"type": "object",
"required": [
"radios"
],
"properties": {
"radios": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"isup",
"standard",
"country",
"band",
"channel",
"bandwidth",
"noise",
"rate",
"channels",
"accesspoints",
"backhauls"
],
"if": {
"properties": {
"band": {
"const": "2.4GHz"
}
}
},
"then": {
"properties": {
"channel": {
"$ref": "#/definitions/channel_2_t"
},
"channels": {
"$ref": "#/definitions/channels_2_t"
}
}
},
"else": {
"properties": {
"channel": {
"$ref": "#/definitions/channel_5_t"
},
"channels": {
"$ref": "#/definitions/channels_5_t"
}
}
},
"properties": {
"name": {
"$ref": "#/definitions/iface_t"
},
"isup": {
"type": "boolean"
},
"standard": {
"type": "string"
},
"country": {
"type": "string",
"minLength": 2,
"maxLength": 3
},
"band": {
"$ref": "#/definitions/band_t"
},
"bandwidth": {
"$ref": "#/definitions/bandwidth_t"
},
"noise": {
"$ref": "#/definitions/noisepower_t"
},
"rate": {
"type": "integer",
"minimum": 0
},
"accesspoints": {
"$ref": "#/definitions/aps_t"
},
"backhauls": {
"$ref": "#/definitions/aps_t"
}
}
}
}
}
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment