Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
json-schema-validator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IOPSYS
json-schema-validator
Commits
9a9e904e
Commit
9a9e904e
authored
5 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
convert to new input/output fmt
parent
a509bcfc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ubus/wifi.json
+201
-174
201 additions, 174 deletions
ubus/wifi.json
ubus/wifi.radio.json
+73
-59
73 additions, 59 deletions
ubus/wifi.radio.json
ubus/wifi.wps.json
+72
-51
72 additions, 51 deletions
ubus/wifi.wps.json
with
346 additions
and
284 deletions
ubus/wifi.json
+
201
−
174
View file @
9a9e904e
{
{
"definitions"
:
{
"definitions"
:
{
"macaddr_t"
:
{
"macaddr_t"
:
{
"title"
:
"MAC Address"
,
"title"
:
"MAC Address"
,
"type"
:
"string"
,
"type"
:
"string"
,
"minLength"
:
17
,
"minLength"
:
17
,
"maxLength"
:
17
,
"maxLength"
:
17
,
"pattern"
:
"^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$"
"pattern"
:
"^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$"
},
},
"noisepower_t"
:
{
"noisepower_t"
:
{
"title"
:
"Noise"
,
"title"
:
"Noise"
,
"type"
:
"integer"
,
"type"
:
"integer"
,
"minimum"
:
-127
,
"minimum"
:
-127
,
"maximum"
:
0
"maximum"
:
0
},
},
"channel_2_t"
:
{
"channel_2_t"
:
{
"title"
:
"2.4GHz Channel"
,
"title"
:
"2.4GHz Channel"
,
"type"
:
"integer"
,
"type"
:
"integer"
,
"minimum"
:
1
,
"minimum"
:
1
,
"maximum"
:
14
"maximum"
:
14
},
},
"channel_5_t"
:
{
"channel_5_t"
:
{
"title"
:
"5GHz Channel"
,
"title"
:
"5GHz Channel"
,
"type"
:
"integer"
,
"type"
:
"integer"
,
"minimum"
:
32
,
"minimum"
:
32
,
"maximum"
:
200
"maximum"
:
200
},
},
"channels_2_t"
:
{
"channels_2_t"
:
{
"title"
:
"2.4GHz Channels"
,
"title"
:
"2.4GHz Channels"
,
"type"
:
"array"
,
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/channel_2_t"
}
"items"
:
{
},
"$ref"
:
"#/definitions/channel_2_t"
"channels_5_t"
:
{
}
"title"
:
"5GHz Channels"
,
},
"type"
:
"array"
,
"channels_5_t"
:
{
"items"
:
{
"$ref"
:
"#/definitions/channel_5_t"
}
"title"
:
"5GHz Channels"
,
},
"type"
:
"array"
,
"iface_t"
:
{
"items"
:
{
"title"
:
"Interface"
,
"$ref"
:
"#/definitions/channel_5_t"
"type"
:
"string"
,
}
"minLength"
:
1
,
},
"maxLength"
:
16
"iface_t"
:
{
},
"title"
:
"Interface"
,
"band_t"
:
{
"type"
:
"string"
,
"title"
:
"WiFi Band"
,
"minLength"
:
1
,
"type"
:
"string"
,
"maxLength"
:
16
"enum"
:
[
"2.4GHz"
,
"5GHz"
]
},
},
"band_t"
:
{
"bandwidth_t"
:
{
"title"
:
"WiFi Band"
,
"title"
:
"Bandwidth"
,
"type"
:
"string"
,
"type"
:
"integer"
,
"enum"
:
[
"enum"
:
[
"2.4GHz"
,
20
,
"5GHz"
40
,
]
80
,
},
160
"bandwidth_t"
:
{
]
"title"
:
"Bandwidth"
,
},
"type"
:
"integer"
,
"aps_t"
:
{
"enum"
:
[
"type"
:
"array"
,
20
,
"items"
:
{
40
,
"type"
:
"object"
,
80
,
"required"
:
[
160
"ifname"
,
]
"status"
,
},
"ssid"
,
"aps_t"
:
{
"bssid"
"type"
:
"array"
,
],
"items"
:
{
"properties"
:
{
"type"
:
"object"
,
"ifname"
:
{
"required"
:
[
"type"
:
"string"
,
"ifname"
,
"minLength"
:
1
,
"status"
,
"maxLength"
:
16
"ssid"
,
},
"bssid"
"status"
:
{
"type"
:
"string"
},
],
"ssid"
:
{
"properties"
:
{
"type"
:
"string"
,
"ifname"
:
{
"minLength"
:
0
,
"type"
:
"string"
,
"maxLength"
:
32
"minLength"
:
1
,
},
"maxLength"
:
16
"bssid"
:
{
"$ref"
:
"#/definitions/macaddr_t"
}
},
}
"status"
:
{
}
"type"
:
"string"
}
},
},
"ssid"
:
{
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"type"
:
"string"
,
"$id"
:
"https://www.iopsys.eu/wifi"
,
"minLength"
:
0
,
"type"
:
"object"
,
"maxLength"
:
32
"properties"
:
{
},
"output"
:
{
"bssid"
:
{
"type"
:
"object"
,
"$ref"
:
"#/definitions/macaddr_t"
"properties"
:
{
}
"status"
:
{
}
"type"
:
"object"
,
}
"required"
:
[
}
"radios"
},
],
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"properties"
:
{
"$id"
:
"https://www.iopsys.eu/wifi"
,
"radios"
:
{
"type"
:
"object"
,
"type"
:
"array"
,
"title"
:
"Wifi"
,
"items"
:
{
"properties"
:
{
"type"
:
"object"
,
"status"
:
{
"required"
:
[
"type"
:
"object"
,
"name"
,
"properties"
:
{
"isup"
,
"input"
:
{
"standard"
,
"type"
:
"object"
,
"country"
,
"properties"
:
{}
"band"
,
},
"channel"
,
"output"
:
{
"bandwidth"
,
"type"
:
"object"
,
"noise"
,
"required"
:
[
"rate"
,
"radios"
"channels"
,
],
"accesspoints"
,
"properties"
:
{
"backhauls"
"radios"
:
{
],
"type"
:
"array"
,
"if"
:
{
"items"
:
{
"properties"
:
{
"type"
:
"object"
,
"band"
:
{
"required"
:
[
"const"
:
"2.4GHz"
"name"
,
}
"isup"
,
}
"standard"
,
},
"country"
,
"then"
:
{
"band"
,
"properties"
:
{
"channel"
,
"channel"
:
{
"$ref"
:
"#/definitions/channel_2_t"
},
"bandwidth"
,
"channels"
:
{
"$ref"
:
"#/definitions/channels_2_t"
}
"noise"
,
}
"rate"
,
},
"channels"
,
"else"
:
{
"accesspoints"
,
"properties"
:
{
"backhauls"
"channel"
:
{
"$ref"
:
"#/definitions/channel_5_t"
},
],
"channels"
:
{
"$ref"
:
"#/definitions/channels_5_t"
}
"if"
:
{
}
"properties"
:
{
},
"band"
:
{
"properties"
:
{
"const"
:
"2.4GHz"
"name"
:
{
"$ref"
:
"#/definitions/iface_t"
},
}
"isup"
:
{
}
"type"
:
"boolean"
},
},
"then"
:
{
"standard"
:
{
"properties"
:
{
"type"
:
"string"
"channel"
:
{
},
"$ref"
:
"#/definitions/channel_2_t"
"country"
:
{
},
"type"
:
"string"
,
"channels"
:
{
"minLength"
:
2
,
"$ref"
:
"#/definitions/channels_2_t"
"maxLength"
:
3
}
},
}
"band"
:
{
"$ref"
:
"#/definitions/band_t"
},
},
"bandwidth"
:
{
"$ref"
:
"#/definitions/bandwidth_t"
},
"else"
:
{
"noise"
:
{
"$ref"
:
"#/definitions/noisepower_t"
},
"properties"
:
{
"rate"
:
{
"channel"
:
{
"type"
:
"integer"
,
"$ref"
:
"#/definitions/channel_5_t"
"minimum"
:
0
},
},
"channels"
:
{
"accesspoints"
:
{
"$ref"
:
"#/definitions/aps_t"
},
"$ref"
:
"#/definitions/channels_5_t"
"backhauls"
:
{
"$ref"
:
"#/definitions/aps_t"
}
}
}
}
}
},
}
"properties"
:
{
}
"name"
:
{
}
"$ref"
:
"#/definitions/iface_t"
}
},
},
"isup"
:
{
"input"
:
{
"type"
:
"boolean"
"type"
:
"object"
,
},
"properties"
:
{
"standard"
:
{
"status"
:
{
"type"
:
"string"
"type"
:
"object"
,
},
"properties"
:
{
}
"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"
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ubus/wifi.radio.json
+
73
−
59
View file @
9a9e904e
...
@@ -105,10 +105,24 @@
...
@@ -105,10 +105,24 @@
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"$id"
:
"https://www.iopsys.eu/wifi.radio"
,
"$id"
:
"https://www.iopsys.eu/wifi.radio"
,
"properties"
:
{
"properties"
:
{
"
o
ut
put
"
:
{
"
a
ut
ochannel
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"autochannel"
:
{
"input"
:
{
"type"
:
"object"
,
"properties"
:
{
"interval"
:
{
"type"
:
"integer"
},
"algo"
:
{
"type"
:
"integer"
},
"scans"
:
{
"type"
:
"integer"
}
}
},
"output"
:
{
"description"
:
"Auto channel selection"
,
"description"
:
"Auto channel selection"
,
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"wifi.radio.autochannel"
,
"title"
:
"wifi.radio.autochannel"
,
...
@@ -135,30 +149,48 @@
...
@@ -135,30 +149,48 @@
"type"
:
"string"
"type"
:
"string"
}
}
}
}
},
}
"get"
:
{
}
"description"
:
"Get value for a radio parameter"
,
},
"scan"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"wifi.radio.iface"
,
"required"
:
[
"status"
,
"value_int"
],
"properties"
:
{
"properties"
:
{
"s
tatus
"
:
{
"s
sid
"
:
{
"
type"
:
"integer
"
"
$ref"
:
"#/definitions/ssid_t
"
},
},
"value_int"
:
{
"bssid"
:
{
"type"
:
"integer"
"$ref"
:
"#/definitions/macaddr_t"
},
"channel"
:
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/channel_2_t"
},
{
"$ref"
:
"#/definitions/channel_5_t"
}
]
}
}
}
}
},
},
"
scan
"
:
{
"
output
"
:
{
"description"
:
"Trigger a scan"
,
"description"
:
"Trigger a scan"
,
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{}
"properties"
:
{}
}
}
},
"scanresults"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
},
"
scanresults
"
:
{
"
output
"
:
{
"description"
:
"Show scan results"
,
"description"
:
"Show scan results"
,
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"wifi.radio.iface"
,
"title"
:
"wifi.radio.iface"
,
...
@@ -249,8 +281,17 @@
...
@@ -249,8 +281,17 @@
}
}
}
}
}
}
}
}
},
"stats"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
},
"
stats
"
:
{
"
output
"
:
{
"description"
:
"Radio statistics"
,
"description"
:
"Radio statistics"
,
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"wifi.radio.iface"
,
"title"
:
"wifi.radio.iface"
,
...
@@ -294,8 +335,17 @@
...
@@ -294,8 +335,17 @@
"$ref"
:
"#/definitions/rxtx_t"
"$ref"
:
"#/definitions/rxtx_t"
}
}
}
}
}
}
},
"status"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
},
"
status
"
:
{
"
output
"
:
{
"description"
:
"Radio status"
,
"description"
:
"Radio status"
,
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"wifi.radio.iface"
,
"title"
:
"wifi.radio.iface"
,
...
@@ -396,18 +446,10 @@
...
@@ -396,18 +446,10 @@
}
}
}
}
},
},
"
inpu
t"
:
{
"
ge
t"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"status"
:
{
"input"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
"stats"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
"get"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"param"
:
{
"param"
:
{
...
@@ -415,41 +457,13 @@
...
@@ -415,41 +457,13 @@
}
}
}
}
},
},
"
scan
"
:
{
"
output
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"ssid"
:
{
"status"
:
{
"$ref"
:
"#/definitions/ssid_t"
},
"bssid"
:
{
"$ref"
:
"#/definitions/macaddr_t"
},
"channel"
:
{
"oneOf"
:
[
{
"$ref"
:
"#/definitions/channel_2_t"
},
{
"$ref"
:
"#/definitions/channel_5_t"
}
]
}
}
},
"scanresults"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
"autochannel"
:
{
"type"
:
"object"
,
"properties"
:
{
"interval"
:
{
"type"
:
"integer"
},
"algo"
:
{
"type"
:
"integer"
"type"
:
"integer"
},
},
"
scan
s"
:
{
"
value
s"
:
{
"type"
:
"integer"
"type"
:
"integer"
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
ubus/wifi.wps.json
+
72
−
51
View file @
9a9e904e
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"$id"
:
"https://www.iopsys.eu/wifi.wps"
,
"$id"
:
"https://www.iopsys.eu/wifi.wps"
,
"properties"
:
{
"properties"
:
{
"
output
"
:
{
"
generate_pin
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"
generate_pin
"
:
{
"
output
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"required"
:
[
"pin"
"pin"
...
@@ -30,63 +30,58 @@
...
@@ -30,63 +30,58 @@
"$ref"
:
"#/definitions/pin_t"
"$ref"
:
"#/definitions/pin_t"
}
}
}
}
},
}
"setpin"
:
{
}
"type"
:
"object"
,
},
"properties"
:
{}
"setpin"
:
{
},
"type"
:
"object"
,
"showpin"
:
{
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"required"
:
[
"pin"
"pin"
],
],
"properties"
:
{
"properties"
:
{
"vif"
:
{
"$ref"
:
"#/definitions/iface_t"
},
"pin"
:
{
"pin"
:
{
"$ref"
:
"#/definitions/pin_t"
"$ref"
:
"#/definitions/pin_t"
}
}
}
}
},
},
"
star
t"
:
{
"
outpu
t"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{}
"properties"
:
{}
},
}
"status"
:
{
}
},
"showpin"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"vif"
:
{
"code"
,
"$ref"
:
"#/definitions/iface_t"
"status"
],
"properties"
:
{
"code"
:
{
"type"
:
"integer"
,
"minimum"
:
0
},
"status"
:
{
"type"
:
"string"
}
}
}
},
},
"stop"
:
{
"output"
:
{
"type"
:
"object"
,
"properties"
:
{}
},
"validate_pin"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"required"
:
[
"
valid
"
"
pin
"
],
],
"properties"
:
{
"properties"
:
{
"
valid
"
:
{
"
pin
"
:
{
"
type"
:
"boolean
"
"
$ref"
:
"#/definitions/pin_t
"
}
}
}
}
}
}
}
}
},
},
"
inpu
t"
:
{
"
star
t"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"
star
t"
:
{
"
inpu
t"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"vif"
:
{
"vif"
:
{
...
@@ -103,11 +98,16 @@
...
@@ -103,11 +98,16 @@
}
}
}
}
},
},
"
stop
"
:
{
"
output
"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{}
"properties"
:
{}
},
}
"status"
:
{
}
},
"status"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"vif"
:
{
"vif"
:
{
...
@@ -115,11 +115,41 @@
...
@@ -115,11 +115,41 @@
}
}
}
}
},
},
"generate_pin"
:
{
"output"
:
{
"type"
:
"object"
,
"required"
:
[
"code"
,
"status"
],
"properties"
:
{
"code"
:
{
"type"
:
"integer"
,
"minimum"
:
0
},
"status"
:
{
"type"
:
"string"
}
}
}
}
},
"stop"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{}
"properties"
:
{}
},
},
"validate_pin"
:
{
"output"
:
{
"type"
:
"object"
,
"properties"
:
{}
}
}
},
"validate_pin"
:
{
"type"
:
"object"
,
"properties"
:
{
"input"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"required"
:
[
"pin"
"pin"
...
@@ -130,23 +160,14 @@
...
@@ -130,23 +160,14 @@
}
}
}
}
},
},
"showpin"
:
{
"output"
:
{
"type"
:
"object"
,
"vif"
:
{
"$ref"
:
"#/definitions/iface_t"
}
},
"setpin"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"required"
:
[
"required"
:
[
"
pin
"
"
valid
"
],
],
"properties"
:
{
"properties"
:
{
"vif"
:
{
"valid"
:
{
"$ref"
:
"#/definitions/iface_t"
"type"
:
"boolean"
},
"pin"
:
{
"$ref"
:
"#/definitions/pin_t"
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment