Skip to content

Commit d9147ff

Browse files
authored
Removed the apparently-unnecessary anyOf blocks (#338)
* removed the apparently-unnecessary anyOf blocks * should fix doc generation script * jq-ification * reverts maximum value to 2**63-1
1 parent 0e301a7 commit d9147ff

File tree

3 files changed

+186
-165
lines changed

3 files changed

+186
-165
lines changed

docs-generator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ def gen_fields(doc, d):
123123
doc.append("\n\n")
124124
doc.append(NoEscape("\\rowcolors{1}{}{lightblue}"))
125125
with doc.create(Tabular("lllp{3.8in}")) as table:
126-
gen_table(table, data["properties"]["captures"]["items"]["anyOf"][0])
127-
gen_fields(doc, data["properties"]["captures"]["items"]["anyOf"][0])
126+
gen_table(table, data["properties"]["captures"]["items"])
127+
gen_fields(doc, data["properties"]["captures"]["items"])
128128

129129
with doc.create(Subsection("Annotations Array")):
130130
doc.append(NoEscape(add_code_tags(data["properties"]["annotations"]["description"])))
131131
doc.append("\n\n")
132132
doc.append(NoEscape("\\rowcolors{1}{}{lightblue}"))
133133
with doc.create(Tabular("lllp{3.8in}")) as table:
134-
gen_table(table, data["properties"]["annotations"]["items"]["anyOf"][0])
135-
gen_fields(doc, data["properties"]["annotations"]["items"]["anyOf"][0])
134+
gen_table(table, data["properties"]["annotations"]["items"])
135+
gen_fields(doc, data["properties"]["annotations"]["items"])
136136

137137
with doc.create(Subsection("SigMF Collection Format")):
138138
doc.append(NoEscape(add_code_tags(data_collection["properties"]["collection"]["description"])))
@@ -158,8 +158,8 @@ def gen_fields(doc, d):
158158
doc.append("\n\n")
159159
doc.append(NoEscape("\\rowcolors{1}{}{lightblue}"))
160160
with doc.create(Tabular("lllp{3.8in}")) as table:
161-
gen_table(table, data_antenna["properties"]["annotations"]["items"]["anyOf"][0])
162-
gen_fields(doc, data_antenna["properties"]["annotations"]["items"]["anyOf"][0])
161+
gen_table(table, data_antenna["properties"]["annotations"]["items"])
162+
gen_fields(doc, data_antenna["properties"]["annotations"]["items"])
163163

164164
doc.append(NoEscape("\\nn"))
165165
doc.append(NoEscape(add_code_tags(data_antenna["properties"]["collection"]["description"])))

extensions/antenna-schema.json

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"global": {
99
"description": "The following names are specified in the `antenna` namespace and should be used in the `global` object:",
1010
"type": "object",
11-
"required": ["antenna:model"],
11+
"required": [
12+
"antenna:model"
13+
],
1214
"properties": {
1315
"antenna:model": {
1416
"description": "Antenna make and model number. E.g. ARA CSB-16, L-com HG3512UP-NF.",
@@ -83,26 +85,20 @@
8385
"type": "array",
8486
"items": {
8587
"type": "object",
86-
"anyOf": [
87-
{
88-
"description": "The annotations value is an array of annotation segment objects that describe anything regarding the signal data not part of the Captures and Global objects. It MUST be sorted by the value of each Annotation Segment's `core:sample_start` key, ascending.",
89-
"type": "object",
90-
"properties": {
91-
"antenna:azimuth_angle": {
92-
"description": "Angle of main beam in azimuthal plane from North, in degrees.",
93-
"type": "number"
94-
},
95-
"antenna:elevation_angle": {
96-
"description": "Angle of main beam in elevation plane from horizontal, in degrees.",
97-
"type": "number"
98-
},
99-
"antenna:polarization": {
100-
"description": "E.g. \"vertical\", \"horizontal\", \"slant-45\", \"left-hand circular\", \"right-hand circular\".",
101-
"type": "string"
102-
}
103-
}
88+
"properties": {
89+
"antenna:azimuth_angle": {
90+
"description": "Angle of main beam in azimuthal plane from North, in degrees.",
91+
"type": "number"
92+
},
93+
"antenna:elevation_angle": {
94+
"description": "Angle of main beam in elevation plane from horizontal, in degrees.",
95+
"type": "number"
96+
},
97+
"antenna:polarization": {
98+
"description": "E.g. \"vertical\", \"horizontal\", \"slant-45\", \"left-hand circular\", \"right-hand circular\".",
99+
"type": "string"
104100
}
105-
]
101+
}
106102
}
107103
},
108104
"collection": {

0 commit comments

Comments
 (0)