Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0dc0cdb

Browse files
Removed boss from receivers and minor_servos
1 parent 9d6a490 commit 0dc0cdb

File tree

13 files changed

+229
-316
lines changed

13 files changed

+229
-316
lines changed

discos_client/initializer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,4 @@ def _find_property_schema(
627627
props = schema.get("properties", {})
628628
if key in props:
629629
return props[key]
630-
any_of = schema.get("anyOf", [])
631-
for candidate in any_of:
632-
cprops = candidate.get("properties", {})
633-
if key in cprops:
634-
return cprops[key]
635630
return None # pragma: no cover

discos_client/schemas/common/receivers.json

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,6 @@
66
"description": "Status of the telescope receivers.",
77
"node": "receivers",
88
"$defs": {
9-
"boss": {
10-
"type": "object",
11-
"title": "Receivers Boss",
12-
"description": "Status of the DISCOS ReceiversBoss component.",
13-
"node": "receivers.boss",
14-
"properties": {
15-
"currentReceiver": {
16-
"type": "string",
17-
"title": "Current Receiver",
18-
"description": "Currently selected receiver's name."
19-
},
20-
"currentSetup": {
21-
"type": "string",
22-
"title": "Current setup",
23-
"description": "Current DISCOS setup code"
24-
},
25-
"status": {
26-
"$ref": "../definitions/status.json"
27-
},
28-
"timestamp": {
29-
"$ref": "../definitions/timestamp.json"
30-
}
31-
},
32-
"required": [
33-
"currentReceiver",
34-
"currentSetup",
35-
"status",
36-
"timestamp"
37-
],
38-
"additionalProperties": false
39-
},
409
"receiver": {
4110
"type": "object",
4211
"title": "Receiver status",
@@ -165,22 +134,38 @@
165134
{
166135
"type": "object",
167136
"properties": {
168-
"boss": { "$ref": "#/$defs/boss" }
137+
"currentReceiver": {
138+
"type": "string",
139+
"title": "Current Receiver",
140+
"description": "Currently selected receiver's name."
141+
},
142+
"currentSetup": {
143+
"type": "string",
144+
"title": "Current setup",
145+
"description": "Current DISCOS setup code"
146+
},
147+
"status": {
148+
"$ref": "../definitions/status.json"
149+
},
150+
"timestamp": {
151+
"$ref": "../definitions/timestamp.json"
152+
}
169153
},
170-
"required": ["boss"],
171-
"additionalProperties": false
154+
"required": [
155+
"currentReceiver",
156+
"currentSetup",
157+
"status",
158+
"timestamp"
159+
]
172160
},
173161
{
174162
"type": "object",
175163
"patternProperties": {
176-
"^(?!boss$)[A-Za-z0-9_]+$": { "$ref": "#/$defs/receiver" }
164+
"^[A-Za-z0-9_]+$": { "$ref": "#/$defs/receiver" }
177165
},
178166
"minProperties": 1,
179167
"maxProperties": 1,
180168
"additionalProperties": false
181169
}
182-
],
183-
"initialize": [
184-
"boss"
185170
]
186171
}

0 commit comments

Comments
 (0)