Skip to content

Commit 3267fc6

Browse files
author
Joel Collins
committed
Fixed finding uriVariables type
1 parent ad150c1 commit 3267fc6

File tree

1 file changed

+7
-1
lines changed
  • labthings/server/spec

1 file changed

+7
-1
lines changed

labthings/server/spec/td.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,13 @@ def view_to_thing_property(self, rules: list, view: View):
134134
for prop_rule in rules:
135135
params_dict = {}
136136
for param in rule_to_params(prop_rule):
137-
params_dict.update({param.get("name"): {"type": param.get("type")}})
137+
params_dict.update(
138+
{
139+
param.get("name"): {
140+
"type": param.get("type") or param.get("schema").get("type")
141+
}
142+
}
143+
)
138144
prop_description["uriVariables"].update(params_dict)
139145
if not prop_description["uriVariables"]:
140146
del prop_description["uriVariables"]

0 commit comments

Comments
 (0)